Generate synthetic functions for local functions with default values, by
re-ordering the lowering phases. The changes in InterfaceLowering are necessary so that IrElements that target the removed functions are re-targeted to the new functions in DefaultImpls. This affects local functions in interface functions since now LocalDeclarationsLowering comes before InterfaceLowering.
This commit is contained in:
committed by
max-kammerer
parent
d2f1852c5e
commit
1abdf0561a
@@ -1,11 +1,10 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
fun box() : String {
|
||||
|
||||
|
||||
fun local(i: Int = 1) : Int {
|
||||
return i
|
||||
}
|
||||
|
||||
return if (local() != 1) "fail" else "OK"
|
||||
}
|
||||
if (local() != 1) return "Fail 1"
|
||||
if (local(2) != 2) return "Fail 2"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user