Error messages about "var with open / custom setter initialization" changed accordingly with the new backing field syntax
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
package foo
|
||||
|
||||
class A {
|
||||
val a: Int = 1
|
||||
get() = field + 1
|
||||
|
||||
fun getA(): Int {
|
||||
return a
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
if (a.a != 2) return "A().a != 2, it: ${a.a}"
|
||||
if (a.getA() != 2) return "A().getA() != 2, it: ${a.getA()}"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user