Merge pull request #80 from Frostman/quickfix-impr

Fix for KT-2174 Need "Replace with unsafe call" intention
This commit is contained in:
Nikolay Krasko
2012-06-26 13:42:34 -07:00
14 changed files with 186 additions and 21 deletions
@@ -0,0 +1,4 @@
// "Remove unnecessary non-null assertion (!!)" "true"
fun test(value : Int) : Int {
value<caret>
}
@@ -0,0 +1,4 @@
// "Replace with dot call" "true"
fun test(value : String) : Int {
return value<caret>.length()
}
@@ -1,4 +0,0 @@
// "Replace with safe call" "true"
fun foo(a: Int?) {
a?.plus(1)
}
@@ -0,0 +1,4 @@
// "Replace with safe (?.) call" "true"
fun foo(a: Int?) {
a?.plus(1)
}
@@ -0,0 +1,4 @@
// "Replace with non-null asserted (!!.) call" "true"
fun foo(a: Int?) {
a!!.plus(1)
}
@@ -0,0 +1,4 @@
// "Remove unnecessary non-null assertion (!!)" "true"
fun test(value : Int) : Int {
value<caret>!!
}
@@ -0,0 +1,4 @@
// "Replace with dot call" "true"
fun test(value : String) : Int {
return value<caret>!!.length()
}
@@ -1,4 +1,4 @@
// "Replace with safe call" "true"
// "Replace with safe (?.) call" "true"
fun foo(a: Int?) {
a<caret>.plus(1)
}
@@ -0,0 +1,4 @@
// "Replace with non-null asserted (!!.) call" "true"
fun foo(a: Int?) {
a<caret>.plus(1)
}