Inline Variable: Var support
#KT-5169 Fixed
This commit is contained in:
-4
@@ -1,4 +0,0 @@
|
||||
fun f() {
|
||||
var v = 239
|
||||
println(<caret>v)
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// ERROR: Cannot perform refactoring.\nCannot find a single definition to inline
|
||||
fun f() {
|
||||
val v = if (true) a else b
|
||||
println(<caret>v++)
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
fun f() {
|
||||
println((if (true) a else b)++)
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
fun foo() {
|
||||
var x = 1
|
||||
val t = <caret>x + 1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
val t = 1 + 1
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// ERROR: Cannot perform refactoring.\nCannot find a single definition to inline
|
||||
fun foo() {
|
||||
var x = 1
|
||||
val t = <caret>x + 1
|
||||
x = 2
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// ERROR: Cannot perform refactoring.\nCannot find a single definition to inline
|
||||
fun foo() {
|
||||
var x = 1
|
||||
val t = <caret>x + 1
|
||||
x++
|
||||
}
|
||||
Reference in New Issue
Block a user