Files
kotlin-fork/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/checkBackingFieldException.kt
T
Andrey Zinovyev 0a68edf3bd [FIR][LightTree] More fixes in diagnostic positioning
Keep tree padding for modifiers
More REFERENCE_EXPRESSIONS kinds
Fix source for some call expressions
2021-04-20 18:13:01 +03:00

20 lines
460 B
Kotlin
Vendored

// FIR_IDENTICAL
package h
class Square() {
var size : Double =
<!UNRESOLVED_REFERENCE!>set<!>(<!UNRESOLVED_REFERENCE!>value<!>) {
//in LT this LAMBDA_EXPRESSION get parsed lazyly, but doesn't got anywhere in FIR tree (as property doesn't have place for it)
<!SYNTAX{PSI}!>$area<!> <!SYNTAX{PSI}!>= size * size<!>
}
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>var area : Double<!>
private set
}
fun main() {
val s = Square()
s.size = 2.0
}