[KAPT] Warn about usage of types from default package
Java doesn't support import from default package. We can't fix it, so we warn about it. #KT-36743
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public final class AnotherRootClass {
|
||||
|
||||
public AnotherRootClass() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public final class RootClass {
|
||||
|
||||
public RootClass() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package test;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.ElementType;
|
||||
|
||||
@Target(value = {ElementType.TYPE, ElementType.METHOD})
|
||||
@Retention(value = RetentionPolicy.RUNTIME)
|
||||
public @interface ClassRefAnnotation {
|
||||
|
||||
Class<?>[] value();
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package test;
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public abstract interface PackedClass {
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public abstract RootClass someMethod();
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public abstract java.lang.Number otherMethod();
|
||||
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
public abstract AnotherRootClass oneMoreMethod();
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package test;
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
@ClassRefAnnotation(value = {RootClass.class})
|
||||
public final class PackedWithAnnotation {
|
||||
|
||||
public PackedWithAnnotation() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user