@@ -1164,22 +1164,21 @@ fc(b) # E: Argument 1 to "fc" has incompatible type "B"; expected "C"
11641164from typing import TypedDict, TypeVar
11651165A = TypedDict('A', {'x': int})
11661166B = TypedDict('B', {'x': int}, total=False)
1167+ B2 = TypedDict('B2', {'x': int}, total=False)
11671168C = TypedDict('C', {'x': int, 'y': str}, total=False)
1169+ C2 = TypedDict('C2', {'x': int, 'y': str}, total=False)
11681170T = TypeVar('T')
11691171def j(x: T, y: T) -> T: return x
11701172a: A
11711173b: B
1174+ b2: B2
11721175c: C
1173- reveal_type(j(a, b)) \
1174- # N: Revealed type is "TypedDict({})"
1175- reveal_type(j(b, b)) \
1176- # N: Revealed type is "TypedDict({'x'?: builtins.int})"
1177- reveal_type(j(c, c)) \
1178- # N: Revealed type is "TypedDict({'x'?: builtins.int, 'y'?: builtins.str})"
1179- reveal_type(j(b, c)) \
1180- # N: Revealed type is "TypedDict({'x'?: builtins.int})"
1181- reveal_type(j(c, b)) \
1182- # N: Revealed type is "TypedDict({'x'?: builtins.int})"
1176+ c2: C2
1177+ reveal_type(j(a, b)) # N: Revealed type is "TypedDict({})"
1178+ reveal_type(j(b, b2)) # N: Revealed type is "TypedDict({'x'?: builtins.int})"
1179+ reveal_type(j(c, c2)) # N: Revealed type is "TypedDict({'x'?: builtins.int, 'y'?: builtins.str})"
1180+ reveal_type(j(b, c)) # N: Revealed type is "TypedDict({'x'?: builtins.int})"
1181+ reveal_type(j(c, b)) # N: Revealed type is "TypedDict({'x'?: builtins.int})"
11831182[builtins fixtures/dict.pyi]
11841183[typing fixtures/typing-typeddict.pyi]
11851184
0 commit comments