mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 15:53:40 +00:00
When deal with constructed object (not this) treat it like it's fully initialized. Otherwise (this or access with no receiver) access instruction should be handled as it was before. #KT-6788 Fixed #KT-4126 Fixed
13 lines
317 B
Kotlin
Vendored
13 lines
317 B
Kotlin
Vendored
class A(val next: A? = null) {
|
|
val x: String
|
|
init {
|
|
<!VAL_REASSIGNMENT!>next?.x<!> = "a"
|
|
x = "b"
|
|
<!VAL_REASSIGNMENT!>this.x<!> = "c"
|
|
x = "d" // don't repeat the same diagnostic again with this receiver
|
|
this.x = "e"
|
|
|
|
<!VAL_REASSIGNMENT!>next?.x<!> = "f"
|
|
}
|
|
}
|