[FIR] Correctly determine primary constructor parameters scope for class initialization section
^KT-58135 Fixed
This commit is contained in:
committed by
Space Team
parent
7ee648a4f5
commit
913b55174d
+31
@@ -0,0 +1,31 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-58135
|
||||
|
||||
class Test(
|
||||
val x: Int, // (1)
|
||||
y: Int // (2)
|
||||
) {
|
||||
val String.x: String get() = this // (3)
|
||||
val String.y: String get() = this // (4)
|
||||
|
||||
val y: Int = y // (5)
|
||||
|
||||
fun test(s: String) {
|
||||
with(s) {
|
||||
x.length // (3)
|
||||
y.length // (4)
|
||||
}
|
||||
}
|
||||
|
||||
val test = with("hello") {
|
||||
x.length // (3)
|
||||
y.inc() // (2)
|
||||
}
|
||||
|
||||
init {
|
||||
with("hello") {
|
||||
x.length // (3)
|
||||
y.inc() // (2)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user