mirror of
https://github.com/microsoft/pyright.git
synced 2024-08-17 03:40:44 +03:00
Fixing wrong type int
to str
of type-concepts.md (#1958)
This commit is contained in:
parent
029eb2c869
commit
e09560c3ea
@ -272,7 +272,7 @@ def add(a: _StrOrFloat, b: _StrOrFloat) -> _StrOrFloat:
|
||||
|
||||
# The arguments for `a` and `b` are both `str`
|
||||
v1 = add("hi", "there")
|
||||
reveal_type(v1) # int
|
||||
reveal_type(v1) # str
|
||||
|
||||
# The arguments for `a` and `b` are both `float`
|
||||
v2 = add(1.3, 2.4)
|
||||
|
Loading…
Reference in New Issue
Block a user