Files
kotlin-fork/compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalViaExplicitThis_after.kt
T
Dmitry Savvinov 5cb949ad7f Fix language features in tests for gradual migration to 1.3 (part 2)
In 1.3, due to changes in language, testdata for some tests can be
different from 1.2

We want to simlultaneously test both versions, so instead of fixing
language version in such tests, we split them into two: one with fixed
1.2, another with fixed 1.3
2018-07-05 10:42:49 +03:00

18 lines
343 B
Kotlin
Vendored

// !LANGUAGE: +ReadDeserializedContracts +UseCallsInPlaceEffect
// See KT-17479
class Test {
val str: String
init {
run {
this@Test.str = "A"
}
run {
// Not sure do we need diagnostic also here
<!VAL_REASSIGNMENT!>this@Test.str<!> = "B"
}
str = "C"
}
}