[FIR] Insert SAM conversion expressions during completion
#KT-62847 Fixed
This commit is contained in:
committed by
Space Team
parent
0b28e770b2
commit
dd1d36816b
@@ -0,0 +1,21 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: Sam.java
|
||||
public interface Sam<T> {
|
||||
T foo();
|
||||
}
|
||||
|
||||
// FILE: Connection.java
|
||||
public interface Connection {
|
||||
<T> T accept(Sam<T> sam);
|
||||
}
|
||||
|
||||
// FILE: box.kt
|
||||
fun test(sam: Sam<*>, c: Connection): Any {
|
||||
return c.accept(sam)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return test({ "OK" }, object: Connection {
|
||||
override fun <T> accept(sam: Sam<T>) = sam.foo()
|
||||
}) as String
|
||||
}
|
||||
Reference in New Issue
Block a user