Made "Remove val/var from parameter" quick fix local.

This commit is contained in:
Evgeny Gerashchenko
2014-10-10 22:21:34 +04:00
parent 7a6429e35e
commit ef93a71e78
13 changed files with 105 additions and 93 deletions
@@ -1,18 +0,0 @@
// "Remove val/var from function, loop and catch parameters in project" "true"
class Class(a: Int, val b: Int, var c: Int, vararg val d: Int) {
}
fun f(a: Int, b: Int, c: Int, vararg d: Int) {
for (i in d) {
}
for (i in d) {
}
try {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
}
}
@@ -1,18 +0,0 @@
// "Remove val/var from function, loop and catch parameters in project" "true"
class Class(a: Int, val b: Int, var c: Int, vararg val d: Int) {
}
fun f(a: Int, <caret>val b: Int, var c: Int, vararg val d: Int) {
for (val i in d) {
}
for (var i in d) {
}
try {
} catch (val e: Exception) {
} catch (var e: Exception) {
} catch (e: Exception) {
}
}
@@ -0,0 +1,8 @@
// "Remove 'val' from parameter" "true"
fun f() {
try {
} catch (<caret>e: Exception) {
}
}
@@ -0,0 +1,3 @@
// "Remove 'val' from parameter" "true"
fun f(<caret>x: String) {
}
@@ -0,0 +1,6 @@
// "Remove 'val' from parameter" "true"
fun f(list: List<String>) {
for (x in list) {
}
}
@@ -0,0 +1,8 @@
// "Remove 'val' from parameter" "true"
fun f() {
try {
} catch (<caret>val e: Exception) {
}
}
@@ -0,0 +1,3 @@
// "Remove 'val' from parameter" "false"
class C(<caret>val x: String) {
}
@@ -0,0 +1,3 @@
// "Remove 'val' from parameter" "true"
fun f(<caret>val x: String) {
}
@@ -0,0 +1,6 @@
// "Remove 'val' from parameter" "true"
fun f(list: List<String>) {
for (val<caret> x in list) {
}
}