Files
kotlin-fork/compiler/testData/diagnostics/tests/j+k/kt36856.kt
T
2020-02-20 14:06:13 +03:00

21 lines
433 B
Kotlin
Vendored

// !CHECK_TYPE
// FILE: Test.java
public class Test {
public <T> T with(Foo<T> matcher) {
return null;
}
public boolean with(Foo<Boolean> matcher) {
return false;
}
}
// FILE: main.kt
class Foo<T>
fun main(foo1: Foo<Boolean>, foo2: Foo<String>) {
val x = object : Test() {} // FE exception is thrown here
x.with(foo1) checkType { _<Boolean>() }
x.with(foo2) checkType { _<String>() }
}