void () { runWithLanguageLevel( LanguageLevel.PYTHON36, () -> { final PyExpression definition = parseExpr(""" from typing import NewType UserId = NewType('UserId', int) expr = UserId"""); for (TypeEvalContext context : getTypeEvalContexts(definition)) { assertInstanceOf(context.getType(definition), PyTypingNewType.class); } final PyExpression instance = parseExpr(""" from typing import NewType UserId = NewType('UserId', int) expr = UserId(12)"""); for (TypeEvalContext context : getTypeEvalContexts(instance)) { assertInstanceOf(context.getType(instance), PyTypingNewType.class); } } ); }