mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Refine type arguments resolution and rendering
In case of type constructors captured parameters from outer classes #KT-5510 Fixed #KT-3112 Fixed #KT-6325 Fixed #KT-408 Fixed #KT-6337 Fixed
This commit is contained in:
5
compiler/testData/codegen/boxWithJava/innerGenericClass/JavaClass.java
vendored
Normal file
5
compiler/testData/codegen/boxWithJava/innerGenericClass/JavaClass.java
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
public abstract class JavaClass {
|
||||
public static String test() {
|
||||
return Test.INSTANCE.foo(new Outer<String>("OK").new Inner<Integer>(1));
|
||||
}
|
||||
}
|
||||
15
compiler/testData/codegen/boxWithJava/innerGenericClass/Kotlin.kt
vendored
Normal file
15
compiler/testData/codegen/boxWithJava/innerGenericClass/Kotlin.kt
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
class Outer<E>(val x: E) {
|
||||
inner class Inner<F>(val y: F) {
|
||||
fun foo() = x.toString() + y.toString()
|
||||
}
|
||||
}
|
||||
|
||||
object Test {
|
||||
fun foo(x: Outer<String>.Inner<Integer>) = x.foo()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val result = JavaClass.test()
|
||||
if (result != "OK1") return "Fail: $result"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user