-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Given the following example:
def foo(flag: bool) -> int:
print('Hello World')
if flag:
return 1
else:
return 'you stupid'
foo(False)we get this error:
untypy.error.UntypyTypeError
given: 'you stupid'
expected: value of type int
context: foo(flag: bool) -> int
^^^
declared at: test.py:1
1 | def foo(flag: bool) -> int:
2 | print('Hello World')
3 | if flag:
4 | return 1
5 | else: | ...
caused by: test.py:1
1 | def foo(flag: bool) -> int:
2 | print('Hello World')
3 | if flag:
4 | return 1
5 | else: | ...
I would expect that the line with return 'you stupid' is blamed for the error and therefor mentioned in the "caused by" part.
Reactions are currently unavailable