Closed
Description
Doubble trouble
def a() -> None:
def b() -> None:
1 + ""
d
d = 1
main.py: note: In function "a":
main.py:3: error: Unsupported operand types for + ("int" and "str")
main.py: note: In function "b":
main.py:3: error: Unsupported operand types for + ("int" and "str")
Trippple threat
from typing import TypeVar, overload, _T as T
@overload
def deco(fn: T) -> T: ...
@overload
def deco() -> None: ...
def deco(fn=None): ...
def a() -> None:
def b() -> None:
1 + ""
d
d = 1
c()
@deco
def c(): ...
main.py: note: In function "a":
main.py:13: error: Unsupported operand types for + ("int" and "str")
main.py: note: In function "b":
main.py:13: error: Unsupported operand types for + ("int" and "str")
main.py: note: In function "a":
main.py:13: error: Unsupported operand types for + ("int" and "str")