blob: b2ae4038381d4d4f2ce100882a18d398e92c9535 [file]
// RUN_PIPELINE_TILL: FRONTEND
class A(val next: A? = null) {
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>val x: String<!>
init {
next?.<!VAL_REASSIGNMENT!>x<!> = "a"
}
}
class B(val next: B? = null) {
var x: String = next?.x ?: "default" // it's ok to use `x` of next
}
/* GENERATED_FIR_TAGS: assignment, classDeclaration, elvisExpression, init, nullableType, primaryConstructor,
propertyDeclaration, safeCall, stringLiteral */