Kapt: Fix "Anonymous class types are not rendered properly in stubs" (KT-18682)

This commit is contained in:
Yan Zhulanow
2017-06-28 22:14:26 +03:00
parent bf2bc1fdc7
commit 4dddb00aca
5 changed files with 187 additions and 39 deletions
+25
View File
@@ -0,0 +1,25 @@
// WITH_RUNTIME
fun test1() = (0..10).map { n ->
object {
override fun hashCode() = n
}
}
fun test2() = (0..10).map { n ->
object : Runnable {
override fun run() {}
}
}
abstract class Foo
fun test3() = (0..10).map { n ->
object : Foo() {}
}
fun test4() = (0..10).map { n ->
object : Foo(), Runnable {
override fun run() {}
}
}
+38
View File
@@ -0,0 +1,38 @@
@kotlin.Metadata()
public abstract class Foo {
public Foo() {
super();
}
}
////////////////////
@kotlin.Metadata()
public final class Kt18682Kt {
public Kt18682Kt() {
super();
}
@org.jetbrains.annotations.NotNull()
public static final java.util.List<java.lang.Object> test1() {
return null;
}
@org.jetbrains.annotations.NotNull()
public static final java.util.List<java.lang.Runnable> test2() {
return null;
}
@org.jetbrains.annotations.NotNull()
public static final java.util.List<Foo> test3() {
return null;
}
@org.jetbrains.annotations.NotNull()
public static final java.util.List<Foo> test4() {
return null;
}
}