FIR IDE: Enable RemoveUselessCastFix.
This commit is contained in:
committed by
teamcityserver
parent
f5a53c82c5
commit
639b7537da
+1
-3
@@ -1,6 +1,4 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun foo(a: String) {
|
||||
val b = a <caret>as String
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun foo(a: String) {
|
||||
val b = a
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
+1
-2
@@ -5,5 +5,4 @@ fun test() {
|
||||
foo()
|
||||
// comment
|
||||
((({ "" } as<caret> () -> String)))
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
Vendored
+1
-2
@@ -5,5 +5,4 @@ fun test() {
|
||||
foo()
|
||||
// comment
|
||||
({ "" })
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun test() {
|
||||
((({ "" } as<caret> () -> String)))
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun test() {
|
||||
{ "" }
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun test() {
|
||||
({ "" } as<caret> () -> String)
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun test() {
|
||||
{ "" }
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -5,5 +5,4 @@ fun test() {
|
||||
foo()
|
||||
// comment
|
||||
({ "" } as<caret> () -> String)
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
+1
-2
@@ -5,5 +5,4 @@ fun test() {
|
||||
foo()
|
||||
// comment
|
||||
({ "" })
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -6,5 +6,4 @@ class A {
|
||||
fun test() {
|
||||
A().foo()
|
||||
({ "" } as<caret> () -> String)
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
+1
-2
@@ -6,5 +6,4 @@ class A {
|
||||
fun test() {
|
||||
A().foo()
|
||||
({ "" })
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -2,5 +2,4 @@
|
||||
fun test() {
|
||||
class A()
|
||||
({ "" } as<caret> () -> String)
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
+1
-2
@@ -2,5 +2,4 @@
|
||||
fun test() {
|
||||
class A()
|
||||
({ "" })
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -4,5 +4,4 @@ open class A
|
||||
fun test() {
|
||||
class B : A()
|
||||
({ "" } as<caret> () -> String)
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
+1
-2
@@ -4,5 +4,4 @@ open class A
|
||||
fun test() {
|
||||
class B : A()
|
||||
({ "" })
|
||||
}
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -4,6 +4,4 @@ fun foo() {}
|
||||
fun main() {
|
||||
foo();
|
||||
({ "" } as<caret> () -> String)
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
+1
-3
@@ -4,6 +4,4 @@ fun foo() {}
|
||||
fun main() {
|
||||
foo();
|
||||
{ "" }
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -4,6 +4,4 @@ fun test(x: Any): Int {
|
||||
return (((x <caret>as String))).length
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
+1
-3
@@ -4,6 +4,4 @@ fun test(x: Any): Int {
|
||||
return x.length
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -4,6 +4,4 @@ fun test(x: Any): Int {
|
||||
return (x <caret>as String).length
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -4,6 +4,4 @@ fun test(x: Any): Int {
|
||||
return x.length
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -4,6 +4,4 @@ fun test(x: Any): String? {
|
||||
return x <caret>as String
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
+1
-3
@@ -4,6 +4,4 @@ fun test(x: Any): String? {
|
||||
return x
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun foo(a: Any) {
|
||||
val b = a <caret>as Any
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
// "Remove useless cast" "true"
|
||||
fun foo(a: Any) {
|
||||
val b = a<caret>
|
||||
}
|
||||
|
||||
/* IGNORE_FIR */
|
||||
}
|
||||
Reference in New Issue
Block a user