Star projection information preserved in substitutions
#KT-6700 Fixed
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
class C<T : C<T>>
|
||||
|
||||
trait Base {
|
||||
fun foo(c: C<*>)
|
||||
}
|
||||
|
||||
class Derived : Base {
|
||||
<caret>
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class C<T : C<T>>
|
||||
|
||||
trait Base {
|
||||
fun foo(c: C<*>)
|
||||
}
|
||||
|
||||
class Derived : Base {
|
||||
override fun foo(c: C<*>) {
|
||||
<selection><caret>throw UnsupportedOperationException()</selection>
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Cast expression 'x' to 'Foo<out Number>'" "true"
|
||||
// "Cast expression 'x' to 'Foo<*>'" "true"
|
||||
trait Foo<T: Number> {
|
||||
fun foo()
|
||||
}
|
||||
@@ -6,6 +6,6 @@ trait Foo<T: Number> {
|
||||
fun bar(_x: Any) {
|
||||
var x = _x
|
||||
if (x is Foo<*>) {
|
||||
(x as Foo<out Number>)<caret>.foo()
|
||||
(x as Foo<*>).foo()
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Cast expression 'x' to 'Foo<out Number>'" "true"
|
||||
// "Cast expression 'x' to 'Foo<*>'" "true"
|
||||
trait Foo<T: Number> {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user