Kapt: Convert valid references to qualified names (KT-26304)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
// CORRECT_ERROR_TYPES
|
||||
// NO_VALIDATION
|
||||
|
||||
//FILE: lib/Anno.java
|
||||
package lib;
|
||||
|
||||
public @interface Anno {
|
||||
Class<?>[] impls() default {};
|
||||
}
|
||||
|
||||
//FILE: lib/impl/Impl.java
|
||||
package lib.impl;
|
||||
|
||||
public class Impl {}
|
||||
|
||||
// FILE: test.kt
|
||||
@file:Suppress("UNRESOLVED_REFERENCE", "ANNOTATION_ARGUMENT_MUST_BE_CONST", "NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION")
|
||||
package test
|
||||
|
||||
import lib.Anno
|
||||
import lib.impl.Impl
|
||||
|
||||
typealias Joo = Impl
|
||||
|
||||
@Anno(impls = [Impl::class])
|
||||
class Foo
|
||||
|
||||
@Anno(impls = [Impl::class, ABC::class])
|
||||
class Bar
|
||||
|
||||
@Anno(impls = [Joo::class])
|
||||
class Boo
|
||||
@@ -0,0 +1,61 @@
|
||||
package lib;
|
||||
|
||||
public @interface Anno {
|
||||
|
||||
Class<?>[] impls() default {};
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package lib.impl;
|
||||
|
||||
public class Impl {
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package test;
|
||||
|
||||
import lib.Anno;
|
||||
import lib.impl.Impl;
|
||||
|
||||
@kotlin.Metadata()
|
||||
@lib.Anno(impls = {lib.impl.Impl.class, ABC.class})
|
||||
public final class Bar {
|
||||
|
||||
public Bar() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package test;
|
||||
|
||||
import lib.Anno;
|
||||
import lib.impl.Impl;
|
||||
|
||||
@kotlin.Metadata()
|
||||
@lib.Anno(impls = {lib.impl.Impl.class})
|
||||
public final class Boo {
|
||||
|
||||
public Boo() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package test;
|
||||
|
||||
import lib.Anno;
|
||||
import lib.impl.Impl;
|
||||
|
||||
@kotlin.Metadata()
|
||||
@lib.Anno(impls = {lib.impl.Impl.class})
|
||||
public final class Foo {
|
||||
|
||||
public Foo() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user