Recognize Checker Framework declaration annotations.

We are migrating Guava to use these annotations rather than jsr305's
@Nullable. We can't use the Checker Framework's _@Nullable_ yet because
we promise compatibility with Java 7, which doesn't support type
annotations. This is related to but distinct from
https://youtrack.jetbrains.com/issue/KT-21408, which is about a
different jsr305 annotation we use, @ParametersAreNonnullByDefault.

I've also updated some docs to mention Kotlin's existing support for the
Checker Framework _@NonNull_.
This commit is contained in:
Chris Povirk
2017-12-04 17:22:54 -05:00
committed by Alexander Udalov
parent 79359b7bc2
commit ac87ad422d
10 changed files with 107 additions and 1 deletions
@@ -48,6 +48,12 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst
doTest(fileName);
}
@TestMetadata("checkerFramework.kt")
public void testCheckerFramework() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/checkerFramework.kt");
doTest(fileName);
}
@TestMetadata("eclipse.kt")
public void testEclipse() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/eclipse.kt");
@@ -48,6 +48,12 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTestGe
doTest(fileName);
}
@TestMetadata("checkerFramework.kt")
public void testCheckerFramework() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/checkerFramework.kt");
doTest(fileName);
}
@TestMetadata("eclipse.kt")
public void testEclipse() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/eclipse.kt");
@@ -48,6 +48,12 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT
doTest(fileName);
}
@TestMetadata("checkerFramework.kt")
public void testCheckerFramework() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/checkerFramework.kt");
doTest(fileName);
}
@TestMetadata("eclipse.kt")
public void testEclipse() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/eclipse.kt");
@@ -48,6 +48,12 @@ public class JavacForeignAnnotationsTestGenerated extends AbstractJavacForeignAn
doTest(fileName);
}
@TestMetadata("checkerFramework.kt")
public void testCheckerFramework() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/checkerFramework.kt");
doTest(fileName);
}
@TestMetadata("eclipse.kt")
public void testEclipse() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/eclipse.kt");