5cb949ad7f
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
24 lines
470 B
Kotlin
Vendored
24 lines
470 B
Kotlin
Vendored
// !LANGUAGE: -RestrictionOfValReassignmentViaBackingField
|
|
|
|
package a
|
|
|
|
import java.util.HashSet
|
|
|
|
val a: MutableSet<String>? = null
|
|
get() {
|
|
if (a == null) {
|
|
<!VAL_REASSIGNMENT_VIA_BACKING_FIELD!>field<!> = HashSet()
|
|
}
|
|
return a
|
|
}
|
|
|
|
class R {
|
|
val b: String? = null
|
|
get() {
|
|
if (b == null) {
|
|
<!VAL_REASSIGNMENT_VIA_BACKING_FIELD!>field<!> = "b"
|
|
}
|
|
return b
|
|
}
|
|
}
|