by ryanprichard · 10y ago · 0 comments
def foo(n: int):
pass
def bar():
foo("123")
It does detect this mismatch: def foo(n: int):
pass
foo("123") def foo(n: int):
pass
def bar() -> None:
foo("123")
>> main: note: In function "bar":
>> main:4: error: Argument 1 to "foo" has incompatible type "str"; expected "int"