[FIR-TEST] Add new testdata generated after changes in previous commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// !CHECK_TYPE
|
||||
|
||||
//KT-731 Missing error from type inference
|
||||
package a
|
||||
|
||||
class A<T>(x: T) {
|
||||
val p = x
|
||||
}
|
||||
|
||||
fun <T, G> A<T>.foo(x: (T)-> G): G {
|
||||
return x(this.p)
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val a = A(1)
|
||||
val t: String = a.foo({p -> p})
|
||||
checkSubtype<String>(t)
|
||||
}
|
||||
Reference in New Issue
Block a user