void () { runWithLanguageLevel( LanguageLevel.PYTHON36, () -> doTest("Cat", """ from typing import NamedTuple class Cat(NamedTuple): name: str age: int expr = Cat("name", 5)._replace(name="newname")""") ); runWithLanguageLevel( LanguageLevel.PYTHON36, () -> doTest("Cat", """ from typing import NamedTuple Cat = NamedTuple("Cat", name=str, age=int) expr = Cat("name", 5)._replace(name="newname")""") ); runWithLanguageLevel( LanguageLevel.PYTHON36, () -> doTest("int", """ from typing import NamedTuple Cat = NamedTuple("Cat", name=str, age=int) expr = Cat("name", 5)._replace(age="give").age""") ); runWithLanguageLevel( LanguageLevel.PYTHON36, () -> doTest("Cat", """ from typing import NamedTuple class Cat(NamedTuple): name: str age: int expr = Cat._replace(Cat("name", 5), name="newname")""") ); }