mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Fix for KT-16411, KT-16412: Exception from compiler when try call SAM constructor where argument is callable reference to nested class inside object
#Fixed KT-16411 #Fixed KT-16412
This commit is contained in:
20
compiler/testData/codegen/boxAgainstJava/callableReference/kt16412.kt
vendored
Normal file
20
compiler/testData/codegen/boxAgainstJava/callableReference/kt16412.kt
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
// FILE: MFunction.java
|
||||
|
||||
public interface MFunction<T, R> {
|
||||
R invoke(T t);
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
|
||||
|
||||
object Foo {
|
||||
class Requester(val dealToBeOffered: String)
|
||||
}
|
||||
|
||||
class Bar {
|
||||
val foo = MFunction(Foo::Requester)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return Bar().foo("OK").dealToBeOffered
|
||||
}
|
||||
Reference in New Issue
Block a user