ConvertIfWithThrowToAssertIntention: generate assert with lazy argument
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {
|
||||
kotlin.assert(!true, "text")
|
||||
kotlin.assert(!true) { "text" }
|
||||
}
|
||||
|
||||
fun assert(x: Boolean, y: Any) {}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
package foo.kotlin
|
||||
|
||||
fun foo() {
|
||||
kotlin.assert(!true, "text")
|
||||
kotlin.assert(!true) { "text" }
|
||||
}
|
||||
|
||||
fun assert(x: Boolean, y: Any) {}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {
|
||||
val x = true
|
||||
assert(!(x && false), "text")
|
||||
assert(!(x && false)) { "text" }
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {
|
||||
assert(!true, "text")
|
||||
assert(!true) { "text" }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {
|
||||
assert(!true, "text")
|
||||
assert(!true) { "text" }
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
fun foo() {
|
||||
assert(1 != 0, "text")
|
||||
assert(1 != 0) { "text" }
|
||||
}
|
||||
Reference in New Issue
Block a user