K2: reproduce some situations related to KT-62134

This commit is contained in:
Mikhail Glukhikh
2024-01-31 12:09:02 +01:00
committed by Space Team
parent 36dd9b6818
commit 3c3396a87e
7 changed files with 80 additions and 0 deletions
@@ -0,0 +1,25 @@
// ISSUE: KT-62134
// FILE: Base.java
public class Base<T> {
public T foo() {
return null;
}
}
// FILE: test.kt
class Bar
class Foo<in T> : Base<<!TYPE_VARIANCE_CONFLICT_ERROR!>T<!>>() {
private val dnn: T & Any = TODO()
private val flex = foo()
fun bar(f: Foo<Bar>) {
val dnn = f.dnn
val flex = f.flex
}
}
@@ -0,0 +1,25 @@
// ISSUE: KT-62134
// FILE: Base.java
public class Base<T> {
public T foo() {
return null;
}
}
// FILE: test.kt
class Bar
class Foo<in T> : Base<<!TYPE_VARIANCE_CONFLICT_ERROR!>T<!>>() {
private val dnn: T & Any = TODO()
private val flex = foo()
fun bar(f: Foo<Bar>) {
val dnn = f.<!INVISIBLE_MEMBER!>dnn<!>
val flex = f.<!INVISIBLE_MEMBER!>flex<!>
}
}