Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/sam.kt
T
Mikhail Zarechenskiy 787a8bb9bd Revert "[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI"
This reverts commit 7c4101e21c.

 #KT-31866 Fixed
 #KT-31868 Fixed
 #EA-125401 Fixed
 #KT-25290 Open
2019-06-07 12:31:38 +03:00

32 lines
720 B
Kotlin
Vendored

// FILE: test/GenericSam.java
package test;
public interface GenericSam<T> {
void invoke(T t);
}
// FILE: test.kt
import test.GenericSam
fun f1() = Runnable::class
fun f2() = Runnable::run
fun f3() = java.lang.Runnable::class
fun f4() = java.lang.Runnable::run
fun f5() = GenericSam::class
fun f6() = GenericSam<*>::invoke
fun f7() = test.GenericSam::class
fun f8() = test.GenericSam<String>::invoke
fun g1() = Runnable {}::class
fun g2() = Runnable {}::run
fun g3() = java.lang.Runnable {}::class
fun g4() = java.lang.Runnable {}::run
fun g5() = GenericSam<String> {}::class
fun g6() = GenericSam<String> {}::invoke
fun g7() = test.GenericSam<String> {}::class
fun g8() = test.GenericSam<String> {}::invoke