Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/kt37530.kt
T
Pavel Kirpichenkov a416fde814 [NI] Move abstract class instantiation check to call checkers
This way the check works for callable reference arguments.
Also candidate applicability during resolution does not change compared to the old inference.
^KT-37530 Fixed
2020-03-31 12:04:01 +03:00

12 lines
270 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
abstract class Abstract
fun <D> create(fn: () -> D): D {
return fn()
}
fun main() {
create(::<!CREATING_AN_INSTANCE_OF_ABSTRACT_CLASS, OI;CREATING_AN_INSTANCE_OF_ABSTRACT_CLASS, OI;CREATING_AN_INSTANCE_OF_ABSTRACT_CLASS!>Abstract<!>)
}