PY-16412 Prohibit annotations for structural types

since they cannot be expression in PEP 484 compatible format (yet).
This commit is contained in:
Mikhail Golubev
2018-02-05 21:41:59 +03:00
committed by Andrey Vlasovskikh
parent 7af0d59f92
commit eedca22cbb
8 changed files with 68 additions and 4 deletions
@@ -215,6 +215,14 @@ public class PyAnnotateVariableTypeIntentionTest extends PyIntentionTestCase {
doAnnotationTest();
}
public void testAnnotationNotPossibleForStructuralType() {
doAnnotationTest();
}
public void testAnnotationNotPossibleForNestedStructuralType() {
doAnnotationTest();
}
private void doAnnotationTest() {
doTest(LanguageLevel.PYTHON36);
}