mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
JVM IR: Support -Xno-call-assertions
This commit is contained in:
committed by
Dmitry Petrov
parent
61e6d346aa
commit
cf3e4608f3
@@ -0,0 +1,25 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// FILE: test.kt
|
||||
import kotlin.test.*
|
||||
|
||||
fun box(): String {
|
||||
assertFailsWith<NullPointerException> { J.j().method() }
|
||||
assertFailsWith<NullPointerException> { J.j().field }
|
||||
assertFailsWith<NullPointerException> { J.j().field = 42 }
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
public class J {
|
||||
public Object field;
|
||||
|
||||
public void method() {}
|
||||
|
||||
public static J j() { return null; }
|
||||
}
|
||||
|
||||
// @TestKt.class:
|
||||
// 0 checkNotNullExpressionValue
|
||||
// 0 checkExpressionValueIsNotNull
|
||||
Reference in New Issue
Block a user