Closed
Description
Bug Report
False negative in the following example:
To Reproduce
Playground Link
from typing import Protocol
from typing_extensions import ParamSpec, Concatenate
P = ParamSpec("P")
class A(Protocol[P]):
def foo(self, *args: P.args, **kwargs: P.kwargs):
...
def bar(b: A[P]) -> A[Concatenate[int, P]]:
return b # no error
Expected Behavior
Type error on return b
, which is what pyright does (pyright playground)
Actual Behavior
No type error.
Your Environment
- Mypy version used: 0.991