PY-16412 Proper use of a smart pointer in case of malformed annotations

Namely, it was mistakenly dereferenced before the document was
committed after modifications.

Callable types are still not rendered properly in PEP 484 compatible
format, but at least they don't lead to PIEAE anymore.
This commit is contained in:
Mikhail Golubev
2018-02-05 21:41:59 +03:00
committed by Andrey Vlasovskikh
parent eedca22cbb
commit 149eefa75e
4 changed files with 19 additions and 2 deletions
@@ -223,6 +223,10 @@ public class PyAnnotateVariableTypeIntentionTest extends PyIntentionTestCase {
doAnnotationTest();
}
public void testAnnotationCallableType() {
doAnnotationTest();
}
private void doAnnotationTest() {
doTest(LanguageLevel.PYTHON36);
}