K2: add test confirming successful work of KT-56261
This commit is contained in:
committed by
Space Team
parent
314784f435
commit
2405f28e64
+19
@@ -0,0 +1,19 @@
|
||||
FILE: localVariableInSecondaryConstructor.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
lval localVariable: R|kotlin/Int| = Int(0)
|
||||
local final class LocalClass : R|kotlin/Any| {
|
||||
public constructor(arg: R|kotlin/Int|): R|LocalClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val arg: R|kotlin/Int| = R|<local>/arg|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public constructor(): R|LocalClass| {
|
||||
this<R|LocalClass|>(R|<local>/localVariable|)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
R|/LocalClass.LocalClass|().R|<local>/arg|
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fun main() {
|
||||
|
||||
val localVariable = 0
|
||||
|
||||
class LocalClass(val arg: Int) {
|
||||
constructor() : this(localVariable)
|
||||
}
|
||||
|
||||
LocalClass().arg
|
||||
}
|
||||
Reference in New Issue
Block a user