void () { final String text = """ def foo(bar): expr = bar def use_foo(x): foo(x) foo(3) foo('bar') """; final PyExpression expr = parseExpr(text); assertNotNull(expr); doTest("Union[Union[int, str], Any]", expr, TypeEvalContext.codeCompletion(expr.getProject(), expr.getContainingFile())); }