Files
kotlin/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/checkBackingFieldException.jet
2012-06-22 19:02:03 +04:00

17 lines
295 B
Plaintext

package h
class Square() {
var size : Double =
<!UNRESOLVED_REFERENCE!>set<!>(<!UNRESOLVED_REFERENCE!>value<!>) {
$area = size * size
}
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>var area : Double<!>
private set
}
fun main(args : Array<String>) {
val s = Square()
s.size = 2.0
}