Fix wrong nullability enhancement for annotated java.lang.Object type

Effectively, this commit drops cached value for j.l.Object type
This cache was introduced when types were immutable, but they
became mutable after starting reading top-level TYPE_USE annotations,
that lead to changing shared JAVA_LANG_OBJECT_CLASSIFIER_TYPE instance

 #KT-20826 Fixed
This commit is contained in:
Denis Zharkov
2017-10-20 09:43:25 +03:00
parent 3c9ef6d319
commit da52716bfd
8 changed files with 69 additions and 26 deletions
@@ -48,6 +48,12 @@ public class ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated extends
doTest(fileName);
}
@TestMetadata("typeUseOnObject.kt")
public void testTypeUseOnObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt");
doTest(fileName);
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -48,6 +48,12 @@ public class ForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingT
doTest(fileName);
}
@TestMetadata("typeUseOnObject.kt")
public void testTypeUseOnObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt");
doTest(fileName);
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -48,6 +48,12 @@ public class ForeignJava8AnnotationsTestGenerated extends AbstractForeignJava8An
doTest(fileName);
}
@TestMetadata("typeUseOnObject.kt")
public void testTypeUseOnObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt");
doTest(fileName);
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -48,6 +48,12 @@ public class JavacForeignJava8AnnotationsTestGenerated extends AbstractJavacFore
doTest(fileName);
}
@TestMetadata("typeUseOnObject.kt")
public void testTypeUseOnObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt");
doTest(fileName);
}
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)