[FIR2IR] Fix adapted callable reference to nested class constructor
^KT-56829 Fixed
This commit is contained in:
committed by
Space Team
parent
e0baeb53db
commit
c4255cdb0f
+13
@@ -0,0 +1,13 @@
|
||||
class Command {
|
||||
class Add(val arg: String? = "OK")
|
||||
inner class InnerAdd(val arg: String? = "OK")
|
||||
}
|
||||
|
||||
fun execute(func: () -> Command.Add) = func()
|
||||
fun execute(c: Command, func: (Command) -> Command.InnerAdd) = func(c)
|
||||
|
||||
fun box(): String {
|
||||
if (execute(Command::Add).arg != "OK") return "FAIL 1"
|
||||
if (execute(Command(), Command::InnerAdd).arg != "OK") return "FAIL 2"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user