Migration to new backing field syntax

This commit is contained in:
Mikhail Glukhikh
2015-09-22 10:15:52 +03:00
parent b4efe33efa
commit 86833c1a74
5 changed files with 8 additions and 8 deletions
@@ -25,7 +25,7 @@ public abstract class InstructionWithNext(
) : JetElementInstructionImpl(element, lexicalScope) {
public var next: Instruction? = null
set(value: Instruction?) {
$next = outgoingEdgeTo(value)
field = outgoingEdgeTo(value)
}
override val nextInstructions: Collection<Instruction>
@@ -31,7 +31,7 @@ public abstract class AbstractJumpInstruction(
) : JetElementInstructionImpl(element, lexicalScope), JumpInstruction {
public var resolvedTarget: Instruction? = null
set(value: Instruction?) {
$resolvedTarget = outgoingEdgeTo(value)
field = outgoingEdgeTo(value)
}
protected abstract fun createCopy(newLabel: Label, lexicalScope: LexicalScope): AbstractJumpInstruction
@@ -33,7 +33,7 @@ public class LocalFunctionDeclarationInstruction(
) : InstructionWithNext(element, lexicalScope) {
public var sink: SubroutineSinkInstruction? = null
set(value: SubroutineSinkInstruction?) {
$sink = outgoingEdgeTo(value) as SubroutineSinkInstruction?
field = outgoingEdgeTo(value) as SubroutineSinkInstruction?
}
override val nextInstructions: Collection<Instruction>
@@ -93,7 +93,7 @@ public abstract class JetCodeFragment(
override fun getSuperType() = superType
override fun setSuperType(superType: PsiType?) {
$superType = superType
this.superType = superType
}
override fun importsToString(): String {
@@ -11,14 +11,14 @@ class Customer : ChangeSupport() {
// via KT-1299
var name: String? = null
set(value) {
changeProperty("name", $name, value)
$name = value
changeProperty("name", field, value)
field = value
}
var city: String? = null
set(value) {
changeProperty("city", $city, value)
$city = value
changeProperty("city", field, value)
field = value
}
override fun toString() = "Customer($name, $city)"