PY-16412 Fix NPE when a target expression is annotated with explicit Any

This commit is contained in:
Mikhail Golubev
2018-02-05 21:41:59 +03:00
committed by Andrey Vlasovskikh
parent 073510924a
commit 25710b0fe1
2 changed files with 12 additions and 1 deletions
@@ -777,6 +777,17 @@ public class PyTypingTest extends PyTestCase {
"expr = x");
}
// PY-16412
public void testLocalVariableAnnotationAheadOfTimeExplicitAny() {
doTest("Any",
"from typing import Any\n" +
"\n" +
"def func(x):\n" +
" var: Any\n" +
" var = x\n" +
" expr = var\n");
}
// PY-21864
public void testClassAttributeAnnotationAheadOfTimeInAnotherFile() {
doMultiFileStubAwareTest("int",