void () { runWithLanguageLevel( LanguageLevel.getLatest(), () -> doTestByText(""" from typing_extensions import TypedDict class EasyDict(TypedDict): a: str b: str c: str class NotSoHardDict(TypedDict): a: str b: EasyDict class HardDict(TypedDict): a: str d: NotSoHardDict q: HardDict = { 'a': <warning descr="Expected type 'str', got 'int' instead">42</warning>, 'd': { 'b': <warning descr="TypedDict 'EasyDict' has missing keys: 'b', 'c'">{'a': <warning descr="Expected type 'str', got 'int' instead">42</warning>, <warning descr="Extra key 'd' for TypedDict 'EasyDict'">'d': 42</warning>}</warning>, 'a': 'xx', <warning descr="Extra key 'c' for TypedDict 'NotSoHardDict'">'c': 42</warning> }, } t = { 'a': 'xx', 'd': { 0: 'zero', } } s: HardDict = {'a': 'xx', 'd': <warning descr="Expected type 'NotSoHardDict', got 'dict[str, dict[int, str] | str]' instead">t</warning>} s1: HardDict = <warning descr="Expected type 'HardDict', got 'dict[str, dict[int, str] | str]' instead">t</warning> t1 = { 'a': 'xx', 'd': { 'a': 0, 'd': {} } } s2: HardDict = {'a': 'xx', 'd': <warning descr="Expected type 'NotSoHardDict', got 'dict[str, dict[str, dict | int] | str]' instead">t1</warning>} s3: HardDict = <warning descr="Expected type 'HardDict', got 'dict[str, dict[str, dict | int] | str]' instead">t1</warning> s4: HardDict = <warning descr="TypedDict 'HardDict' has missing key: 'a'">{ 'd': { 'a': 'a', 'b': {'a': 'a', 'b': 'b', 'c': 'c'} } }</warning> """ ) ); }