Copy type parameters for JVM function accessors
Otherwise generic signature wasn't correctly written to accessors, resulting in classfiles not being valid and javac failing to compile Java sources against them
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
package test;
|
||||
|
||||
public class AccessorGenericSignature {
|
||||
private final BadClass b = new BadClass();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package test
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
public class BadClass {
|
||||
fun foo() {
|
||||
val x: () -> Int = {
|
||||
bar(ArrayList<Int>())
|
||||
baz<Double, ArrayList<ArrayList>>(ArrayList())
|
||||
}
|
||||
}
|
||||
|
||||
private fun <D> bar(f: List<D>) {}
|
||||
|
||||
private fun <E : Number, F : MutableList<E>> baz(m: List<F>) {}
|
||||
}
|
||||
Reference in New Issue
Block a user