Add "Change to val" quick fix for MUST_BE_INITIALIZED
#KT-15723 Fixed
This commit is contained in:
committed by
Vladimir Dolzhenko
parent
a46c6ce5df
commit
c87bc2123c
+5
@@ -0,0 +1,5 @@
|
||||
// "Change to val" "true"
|
||||
class Test {
|
||||
var foo<caret>
|
||||
get() = 1
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// "Change to val" "true"
|
||||
class Test {
|
||||
val foo
|
||||
get() = 1
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Change to val" "true"
|
||||
class Test {
|
||||
var foo: Int<caret>
|
||||
get() {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// "Change to val" "true"
|
||||
class Test {
|
||||
val foo: Int
|
||||
get() {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Change to val" "false"
|
||||
// ACTION: Add initializer
|
||||
// ACTION: Convert member to extension
|
||||
// ACTION: Initialize with constructor parameter
|
||||
// ACTION: Introduce backing property
|
||||
// ACTION: Move to companion object
|
||||
// ACTION: Specify type explicitly
|
||||
// ERROR: Property must be initialized
|
||||
class Test {
|
||||
var foo<caret>
|
||||
get() {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user