Kapt: Fix compilation errors when the referenced class has '$' in the beginning of its name (KT-22493)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// CORRECT_ERROR_TYPES
|
||||
|
||||
// FILE: $Test.java
|
||||
public class $Test {
|
||||
public static class $Inner {}
|
||||
}
|
||||
|
||||
// FILE: Test$.java
|
||||
public class Test$ {
|
||||
public static class Inner$ {}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
package test
|
||||
|
||||
fun test(a: `$Test`.`$Inner`) {}
|
||||
|
||||
fun test(a: `Test$`.`Inner$`) {}
|
||||
@@ -0,0 +1,52 @@
|
||||
public class $Test {
|
||||
|
||||
public $Test() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static class $Inner {
|
||||
|
||||
public $Inner() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
|
||||
public class Test$ {
|
||||
|
||||
public Test$() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static class Inner$ {
|
||||
|
||||
public Inner$() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
package test;
|
||||
|
||||
import java.lang.System;
|
||||
|
||||
@kotlin.Metadata()
|
||||
public final class TestKt {
|
||||
|
||||
public TestKt() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static final void test(@org.jetbrains.annotations.NotNull()
|
||||
$Test.$Inner a) {
|
||||
}
|
||||
|
||||
public static final void test(@org.jetbrains.annotations.NotNull()
|
||||
Test$.Inner$ a) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// CORRECT_ERROR_TYPES
|
||||
|
||||
// FILE: te/st/a/JavaClass
|
||||
package te.st.a;
|
||||
|
||||
public class JavaClass {}
|
||||
|
||||
// FILE: test.kt
|
||||
@file:Suppress("UNRESOLVED_REFERENCE")
|
||||
package te.st.a
|
||||
|
||||
import te.st.a.`$Test`.Inner as MyInner
|
||||
import te.st.a.`Test$`.Inner as MyInner2
|
||||
import te.st.a.`Test$`.`Inner$` as MyInner3
|
||||
|
||||
fun a(a: MyInner) {}
|
||||
@@ -0,0 +1,17 @@
|
||||
package te.st.a;
|
||||
|
||||
import te.st.a.$Test.Inner;
|
||||
import te.st.a.Test$.Inner$;
|
||||
|
||||
@kotlin.Suppress(names = {"UNRESOLVED_REFERENCE"})
|
||||
@kotlin.Metadata()
|
||||
public final class TestKt {
|
||||
|
||||
public TestKt() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static final void a(@org.jetbrains.annotations.NotNull()
|
||||
te.st.a.$Test.Inner a) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user