diff --git a/plugins/kapt3/kapt3-base/src/org/jetbrains/kotlin/kapt3/base/javac/KaptJavaLog.kt b/plugins/kapt3/kapt3-base/src/org/jetbrains/kotlin/kapt3/base/javac/KaptJavaLog.kt index 7ba7eabd569..1b9fd80b7c9 100644 --- a/plugins/kapt3/kapt3-base/src/org/jetbrains/kotlin/kapt3/base/javac/KaptJavaLog.kt +++ b/plugins/kapt3/kapt3-base/src/org/jetbrains/kotlin/kapt3/base/javac/KaptJavaLog.kt @@ -215,7 +215,8 @@ class KaptJavaLog( "compiler.err.doesnt.exist", "compiler.err.duplicate.annotation.missing.container", "compiler.err.not.def.access.package.cant.access", - "compiler.err.package.not.visible" + "compiler.err.package.not.visible", + "compiler.err.not.def.public.cant.access" ) } diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java index 854fde82059..ef553a73d9c 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java @@ -339,6 +339,11 @@ public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFi runTest("plugins/kapt3/kapt3-compiler/testData/converter/propertyAnnotations.kt"); } + @TestMetadata("recentlyNullable.kt") + public void testRecentlyNullable() throws Exception { + runTest("plugins/kapt3/kapt3-compiler/testData/converter/recentlyNullable.kt"); + } + @TestMetadata("repeatableAnnotations.kt") public void testRepeatableAnnotations() throws Exception { runTest("plugins/kapt3/kapt3-compiler/testData/converter/repeatableAnnotations.kt"); diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/recentlyNullable.kt b/plugins/kapt3/kapt3-compiler/testData/converter/recentlyNullable.kt new file mode 100644 index 00000000000..6c5a5673733 --- /dev/null +++ b/plugins/kapt3/kapt3-compiler/testData/converter/recentlyNullable.kt @@ -0,0 +1,23 @@ +// FILE: androidx/annotation/RecentlyNullable.java +package androidx.annotation; + +import java.lang.annotation.*; + +@Retention(RetentionPolicy.CLASS) +@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) +@interface RecentlyNullable {} + +// FILE: androidx/annotation/Box.java +package androidx.annotation; + +public interface Box { + @RecentlyNullable + public String foo(); +} + +// FILE: test.kt +package app + +import androidx.annotation.Box + +class KBox(val delegate: Box) : Box by delegate \ No newline at end of file diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/recentlyNullable.txt b/plugins/kapt3/kapt3-compiler/testData/converter/recentlyNullable.txt new file mode 100644 index 00000000000..60e2db544c7 --- /dev/null +++ b/plugins/kapt3/kapt3-compiler/testData/converter/recentlyNullable.txt @@ -0,0 +1,46 @@ +package androidx.annotation; + +public interface Box { + + @RecentlyNullable() + public String foo(); +} + +//////////////////// + +package androidx.annotation; + +import java.lang.annotation.*; + +@Retention(value = RetentionPolicy.CLASS) +@Target(value = {ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) +@interface RecentlyNullable { +} + +//////////////////// + +package app; + +import java.lang.System; + +@kotlin.Metadata() +public final class KBox implements androidx.annotation.Box { + @org.jetbrains.annotations.NotNull() + private final androidx.annotation.Box delegate = null; + + @org.jetbrains.annotations.NotNull() + public final androidx.annotation.Box getDelegate() { + return null; + } + + public KBox(@org.jetbrains.annotations.NotNull() + androidx.annotation.Box delegate) { + super(); + } + + @androidx.annotation.RecentlyNullable() + @java.lang.Override() + public java.lang.String foo() { + return null; + } +}