Open
Description
from typing import Callable, _T as T
def join(t1: T, t2: T) -> T: ...
def f1() -> None: ...
def f2(i: int = 0) -> None: ...
fn: Callable[[], None] = join(f1, f2) # Incompatible types in assignment (expression has type "function", variable has type "Callable[[], None]") [assignment]
f2
is a valid () -> None
, this code should not produce any problems
if there is any concern that this is a duplicate of #17478, the difference is that this scenario is:
join( () -> None, (int=) -> None )
and #17479 is
join( () -> None, (int) -> None )
- reraised from Expression has type "function", variable has type "Callable[[], None]" #10740 as it wasn't resolved