Describe the bug
See code.
Pyright >1.1.309 starts having the bug
Pylance has the problem as well.
Code or Screenshots
from typing import TypeVar, ParamSpec
T = TypeVar("T")
P = ParamSpec("P")
def foo() -> Callable[[Callable[P, T]], Callable[P, T]]:
...
def bar(x: int) -> str:
...
reveal_type(foo()(bar))
# pyright > 1.1.310 outputs: Type of "foo()(bar)" is "(...) -> str"
# pyright <= 1.1.309 outputs: Type of "foo()(bar)" is "(x: int) -> str"