@@ -1164,21 +1164,22 @@ 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)
11681167C = TypedDict('C', {'x': int, 'y': str}, total=False)
1169- C2 = TypedDict('C2', {'x': int, 'y': str}, total=False)
11701168T = TypeVar('T')
11711169def j(x: T, y: T) -> T: return x
11721170a: A
11731171b: B
1174- b2: B2
11751172c: C
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})"
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})"
11821183[builtins fixtures/dict.pyi]
11831184[typing fixtures/typing-typeddict.pyi]
11841185
0 commit comments