"move assignment to initializer" quickfix for assigning to properties in constructors/init blocks
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
var i: Int <spot>= 5</spot>
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
var i: Int
|
||||
|
||||
init {
|
||||
<spot>i = 5</spot>
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention moves an assignment to a property into the initializer of that property.
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user