"field": deprecated warnings introduced, compiler tests migrated to the new syntax

This commit is contained in:
Mikhail Glukhikh
2015-09-17 18:58:30 +03:00
committed by Mikhail Glukhikh
parent 028e0ec59a
commit a1e3471d92
64 changed files with 154 additions and 149 deletions
@@ -4,9 +4,9 @@ open class Base() {
get() = 239
public var readwrite : Int = 0
get() = $readwrite + 1
get() = field + 1
set(n : Int) {
$readwrite = n
field = n
}
}
+4 -4
View File
@@ -1,19 +1,19 @@
public var inc: Int = 0;
public var propInc: Int = 0
get() {++inc; return $propInc}
get() {++inc; return field}
set(a: Int) {
++inc
$propInc = a
field = a
}
public var dec: Int = 0;
public var propDec: Int = 0;
get() { --dec; return $propDec}
get() { --dec; return field}
set(a: Int) {
--dec
$propDec = a
field = a
}
fun box(): String {
@@ -16,11 +16,11 @@ class Z {
public var prop: X = X(0)
get() {
counter++; return $prop
counter++; return field
}
set(a: X) {
counter++
$prop = a;
field = a;
}
}
@@ -1,19 +1,19 @@
public var inc: Int = 0;
public var propInc: Int = 0
get() {inc++; return $propInc}
get() {inc++; return field}
set(a: Int) {
inc++
$propInc = a
field = a
}
public var dec: Int = 0;
public var propDec: Int = 0;
get() { dec--; return $propDec}
get() { dec--; return field}
set(a: Int) {
dec--
$propDec = a
field = a
}
fun box(): String {
@@ -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++
}
}
+2 -2
View File
@@ -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
View File
@@ -2,7 +2,7 @@ class TestObject()
{
companion object {
var prop: Int = 1
get() = $prop++
get() = field++
}
}
@@ -14,7 +14,7 @@ class A {
var r2: Int = 1;
get() {
holder += "getR2"
return $r2
return field
}
fun test2() : Int {
@@ -26,7 +26,7 @@ class A {
var r3: Int = 1;
set(p: Int) {
holder += "setR3"
$r3 = p
field = p
}
fun test3() : Int {
@@ -38,11 +38,11 @@ class A {
var r4: Int = 1;
get() {
holder += "getR4"
return $r4
return field
}
set(p: Int) {
holder += "setR4"
$r4 = p
field = p
}
fun test4() : Int {
+4 -4
View File
@@ -12,7 +12,7 @@ object A {
var r2: Int = 1;
get() {
holder += "getR2"
return $r2
return field
}
fun test2() : Int {
@@ -24,7 +24,7 @@ object A {
var r3: Int = 1;
set(p: Int) {
holder += "setR3"
$r3 = p
field = p
}
fun test3() : Int {
@@ -36,11 +36,11 @@ object A {
var r4: Int = 1;
get() {
holder += "getR4"
return $r4
return field
}
set(p: Int) {
holder += "setR4"
$r4 = p
field = p
}
fun test4() : Int {