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:
@@ -0,0 +1,28 @@
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER
|
||||
// FILE: Outer.java
|
||||
|
||||
public class Outer<E> {
|
||||
public class Inner<F> {
|
||||
E foo() {}
|
||||
F bar() {}
|
||||
|
||||
Outer<E> outer() {}
|
||||
}
|
||||
|
||||
Inner<E> baz() { }
|
||||
void set(Inner<String> x) {}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun main() {
|
||||
var outerStr: Outer<String> = Outer()
|
||||
outerStr.baz().checkType { _<Outer<String>.Inner<String>>() }
|
||||
|
||||
val strInt: Outer<String>.Inner<Int> = outerStr.Inner()
|
||||
|
||||
strInt.foo().checkType { _<String>() }
|
||||
strInt.bar().checkType { _<Int>() }
|
||||
strInt.outer().checkType { _<Outer<String>>() }
|
||||
}
|
||||
Reference in New Issue
Block a user