Skip to content

Commit 05cf2e5

Browse files
committed
Add explicit types to guard against join-vs-union changes
1 parent d9b1295 commit 05cf2e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test-data/unit/check-functions.test

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3705,6 +3705,8 @@ class P(Protocol):
37053705

37063706
def foo(x: P, y: P) -> None: ...
37073707

3708-
foo(*[0, '']) # E: Argument 1 to "foo" has incompatible type "*list[object]"; expected "P"
3709-
foo(**{'x': 0, 'y': ''}) # E: Argument 1 to "foo" has incompatible type "**dict[str, object]"; expected "P"
3708+
args: list[object]
3709+
foo(*args) # E: Argument 1 to "foo" has incompatible type "*list[object]"; expected "P"
3710+
kwargs: dict[str, object]
3711+
foo(**kwargs) # E: Argument 1 to "foo" has incompatible type "**dict[str, object]"; expected "P"
37103712
[builtins fixtures/dict.pyi]

0 commit comments

Comments
 (0)