Fix for KT-3584: Wrong bytecode generated for local class with default parameters and captured local val
#KT-3584 Fixed
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
fun box(): String {
|
||||
val s = "captured";
|
||||
|
||||
class A(val param: String = "OK") {
|
||||
val s2 = s + param
|
||||
}
|
||||
|
||||
if (A().s2 != "capturedOK") return "fail 1: ${A().s2}"
|
||||
|
||||
if (A("Test").s2 != "capturedTest") return "fail 1: ${A("Test").s2}"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user