"field": deprecated warnings introduced, compiler tests migrated to the new syntax
This commit is contained in:
committed by
Mikhail Glukhikh
parent
028e0ec59a
commit
a1e3471d92
@@ -33,7 +33,7 @@ class C {
|
||||
class D {
|
||||
private var foo = 1
|
||||
set(i: Int) {
|
||||
$foo = i + 1
|
||||
field = i + 1
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
|
||||
@@ -9,7 +9,7 @@ class Test {
|
||||
|
||||
public val prop3: Int = 12
|
||||
get() {
|
||||
return $prop3
|
||||
return field
|
||||
}
|
||||
|
||||
var prop4 : Int = 13
|
||||
@@ -23,7 +23,7 @@ class Test {
|
||||
|
||||
public var prop7 : Int = 20
|
||||
set(i: Int) {
|
||||
$prop7++
|
||||
field++
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ open class A(val init: String) {
|
||||
}
|
||||
|
||||
public var backingField : Int = 0
|
||||
get() = $backingField.myInc
|
||||
set(s) { $backingField = s }
|
||||
get() = field.myInc
|
||||
set(s) { field = s }
|
||||
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ class TestObject()
|
||||
{
|
||||
companion object {
|
||||
var prop: Int = 1
|
||||
get() = $prop++
|
||||
get() = field++
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user