[FIR] Add the new test set to render diagnostics from IR const evaluator

This commit is contained in:
Ivan Kylchik
2023-07-17 12:30:25 +02:00
committed by Space Team
parent 87b3d69d1b
commit d0da736b13
19 changed files with 199 additions and 93 deletions
@@ -0,0 +1,5 @@
/exceptionFromInterpreter.kt:(197,200): error: Cannot evaluate constant expression: / by zero
/exceptionFromInterpreter.kt:(239,254): error: Cannot evaluate constant expression: marginPrefix must be non-blank string.
/exceptionFromInterpreter.kt:(305,308): error: Cannot evaluate constant expression: / by zero
@@ -0,0 +1,14 @@
// FIR_IDENTICAL
// !RENDER_IR_DIAGNOSTICS_FULL_TEXT
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// !DIAGNOSTICS: -DIVISION_BY_ZERO
// WITH_STDLIB
const val divideByZero = 1 <!EVALUATION_ERROR!>/ 0<!>
const val trimMarginException = "123".<!EVALUATION_ERROR!>trimMargin(" ")<!>
annotation class A(val i: Int, val b: Int)
@A(1 <!EVALUATION_ERROR!>/ 0<!>, 2)
fun foo() {}