[IR] update testdata: unify representation for error nodes
This commit is contained in:
committed by
teamcityserver
parent
ef9a901635
commit
7df6575a18
@@ -1,12 +1,12 @@
|
||||
fun test1() {
|
||||
error("") /* ERROR EXPRESSION */
|
||||
error("") /* ERROR EXPRESSION */
|
||||
error("") /* ErrorExpression */
|
||||
error("") /* ErrorExpression */
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
L1@ while (true) { // BLOCK
|
||||
error("") /* ERROR EXPRESSION */
|
||||
error("") /* ERROR EXPRESSION */
|
||||
error("") /* ErrorExpression */
|
||||
error("") /* ErrorExpression */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,9 @@ fun test3() {
|
||||
}
|
||||
|
||||
fun test4() {
|
||||
while (error("") /* ERROR EXPRESSION */) { // BLOCK
|
||||
while (error("") /* ErrorExpression */) { // BLOCK
|
||||
}
|
||||
while (error("") /* ERROR EXPRESSION */) { // BLOCK
|
||||
while (error("") /* ErrorExpression */) { // BLOCK
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
fun test1() {
|
||||
error("") /* ERROR EXPRESSION */
|
||||
error("") /* ERROR EXPRESSION */
|
||||
error("") /* ErrorExpression */
|
||||
error("") /* ErrorExpression */
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
L1@ while (true) { // BLOCK
|
||||
error("") /* ERROR EXPRESSION */
|
||||
error("") /* ERROR EXPRESSION */
|
||||
error("") /* ErrorExpression */
|
||||
error("") /* ErrorExpression */
|
||||
}
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
L1@ while (true) { // BLOCK
|
||||
val lambda: Function0<Nothing> = local fun <anonymous>(): Nothing {
|
||||
error("") /* ERROR EXPRESSION */
|
||||
error("") /* ERROR EXPRESSION */
|
||||
error("") /* ErrorExpression */
|
||||
error("") /* ErrorExpression */
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test4() {
|
||||
while (error("") /* ERROR EXPRESSION */) { // BLOCK
|
||||
while (error("") /* ErrorExpression */) { // BLOCK
|
||||
}
|
||||
while (error("") /* ERROR EXPRESSION */) { // BLOCK
|
||||
while (error("") /* ErrorExpression */) { // BLOCK
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+3
-2
@@ -47,7 +47,7 @@ fun test1() {
|
||||
{ // BLOCK
|
||||
val <<array>>: A = A
|
||||
val <<index_0>>: KFunction1<IntArray, Int> = ::withVararg
|
||||
error("") /* ERROR CALL */<<index_0>>; error("") /* ERROR CALL */<<index_0>>; .plus(other = 1);
|
||||
error("") /* ErrorCallExpression */<<index_0>>; error("") /* ErrorCallExpression */<<index_0>>; .plus(other = 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ fun test2() {
|
||||
{ // BLOCK
|
||||
val <<array>>: B = B
|
||||
val <<index_0>>: KFunction1<IntArray, Int> = ::withVararg
|
||||
error("") /* ERROR CALL */<<index_0>>; error("") /* ERROR CALL */<<index_0>>; .plus(other = 1);
|
||||
error("") /* ErrorCallExpression */<<index_0>>; error("") /* ErrorCallExpression */<<index_0>>; .plus(other = 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,3 +95,4 @@ fun test6(a: Any) {
|
||||
<<array>>.set(i = <<index_0>>, newValue = <<array>>.get(i = <<index_0>>).plus(other = 1))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ fun run(x: Boolean, y: Boolean): String {
|
||||
greater(arg0 = z, arg1 = 100) -> return "NOT_OK"
|
||||
}
|
||||
when {
|
||||
x -> error("") /* ERROR EXPRESSION */
|
||||
x -> error("") /* ErrorExpression */
|
||||
}
|
||||
when {
|
||||
y -> continue@l2
|
||||
@@ -22,3 +22,4 @@ fun run(x: Boolean, y: Boolean): String {
|
||||
fun box(): String {
|
||||
return run(x = true, y = true)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
fun foo() {
|
||||
}
|
||||
|
||||
fun test(): ErrorType /* ERROR */ {
|
||||
fun test(): ErrorType {
|
||||
return CHECK_NOT_NULL<KFunction0<Unit>>(arg0 = ::foo)
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ fun test1(a: Any) {
|
||||
}
|
||||
|
||||
fun test2(a: Any) {
|
||||
error("") /* ERROR CALL */
|
||||
error("") /* ErrorCallExpression */
|
||||
}
|
||||
|
||||
fun test3(a: Any) {
|
||||
@@ -29,3 +29,4 @@ fun test3(a: Any) {
|
||||
<array>.set(index = <index0>, value = <unary>.inc())
|
||||
<unary> /*~> Unit */
|
||||
}
|
||||
|
||||
|
||||
+10
-9
@@ -1,5 +1,5 @@
|
||||
fun test(fn: Function0<Unit>, r: Runnable, arr: Array<String>) {
|
||||
error("") /* ERROR CALL */local fun <anonymous>() {
|
||||
error("") /* ErrorCallExpression */local fun <anonymous>() {
|
||||
return Unit
|
||||
}
|
||||
; arr;
|
||||
@@ -7,13 +7,13 @@ fun test(fn: Function0<Unit>, r: Runnable, arr: Array<String>) {
|
||||
return Unit
|
||||
}
|
||||
/*-> Runnable? */, strs = [*arr]) /*~> Unit */
|
||||
error("") /* ERROR CALL */fn; arr;
|
||||
error("") /* ErrorCallExpression */fn; arr;
|
||||
foo1(r = fn /*-> Runnable? */, strs = [*arr]) /*~> Unit */
|
||||
foo1(r = r, strs = [""]) /*~> Unit */
|
||||
error("") /* ERROR CALL */fn; arr;
|
||||
error("") /* ErrorCallExpression */fn; arr;
|
||||
foo1(r = fn /*-> Runnable? */, strs = [*arr]) /*~> Unit */
|
||||
foo1(r = r, strs = [*arr]) /*~> Unit */
|
||||
val i1: ErrorType /* ERROR */ = error("") /* ERROR CALL */local fun <anonymous>() {
|
||||
val i1: ErrorType = error("") /* ErrorCallExpression */local fun <anonymous>() {
|
||||
return Unit
|
||||
}
|
||||
; arr;
|
||||
@@ -21,7 +21,7 @@ fun test(fn: Function0<Unit>, r: Runnable, arr: Array<String>) {
|
||||
return Unit
|
||||
}
|
||||
/*-> Runnable? */, strs = [*arr])
|
||||
val i3: ErrorType /* ERROR */ = error("") /* ERROR CALL */local fun <anonymous>() {
|
||||
val i3: ErrorType = error("") /* ErrorCallExpression */local fun <anonymous>() {
|
||||
return Unit
|
||||
}
|
||||
; local fun <anonymous>() {
|
||||
@@ -43,26 +43,27 @@ fun test(fn: Function0<Unit>, r: Runnable, arr: Array<String>) {
|
||||
return Unit
|
||||
}
|
||||
/*-> Runnable? */, strs = [*arr])
|
||||
error("") /* ERROR CALL */local fun <anonymous>() {
|
||||
error("") /* ErrorCallExpression */local fun <anonymous>() {
|
||||
return Unit
|
||||
}
|
||||
; local fun <anonymous>() {
|
||||
return Unit
|
||||
}
|
||||
; arr;
|
||||
error("") /* ERROR CALL */r; local fun <anonymous>() {
|
||||
error("") /* ErrorCallExpression */r; local fun <anonymous>() {
|
||||
return Unit
|
||||
}
|
||||
; "";
|
||||
error("") /* ERROR CALL */local fun <anonymous>() {
|
||||
error("") /* ErrorCallExpression */local fun <anonymous>() {
|
||||
return Unit
|
||||
}
|
||||
; local fun <anonymous>() {
|
||||
return Unit
|
||||
}
|
||||
; arr;
|
||||
error("") /* ERROR CALL */r; local fun <anonymous>() {
|
||||
error("") /* ErrorCallExpression */r; local fun <anonymous>() {
|
||||
return Unit
|
||||
}
|
||||
; arr;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -44,13 +44,14 @@ fun test6(a: Any) {
|
||||
|
||||
fun test7(a: Function1<Int, Int>) {
|
||||
a as Function0<Unit> /*~> Unit */
|
||||
error("") /* ERROR CALL */a /*as Function0<Unit> */;
|
||||
error("") /* ErrorCallExpression */a /*as Function0<Unit> */;
|
||||
}
|
||||
|
||||
fun test8(a: Function0<Unit>) {
|
||||
error("") /* ERROR CALL */id<Function0<Unit>?>(x = a);
|
||||
error("") /* ErrorCallExpression */id<Function0<Unit>?>(x = a);
|
||||
}
|
||||
|
||||
fun test9() {
|
||||
J().run1(r = ::test9 /*-> Runnable? */)
|
||||
}
|
||||
|
||||
|
||||
+8
-7
@@ -47,11 +47,12 @@ fun takeLong(@ImplicitIntegerCoercion l: Long) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
error("") /* ERROR CALL */255;
|
||||
error("") /* ERROR CALL */255;
|
||||
error("") /* ERROR CALL */255;
|
||||
error("") /* ERROR CALL */256;
|
||||
error("") /* ERROR CALL */255;
|
||||
error("") /* ERROR CALL */255;
|
||||
error("") /* ERROR CALL */255; 255; 42;
|
||||
error("") /* ErrorCallExpression */255;
|
||||
error("") /* ErrorCallExpression */255;
|
||||
error("") /* ErrorCallExpression */255;
|
||||
error("") /* ErrorCallExpression */256;
|
||||
error("") /* ErrorCallExpression */255;
|
||||
error("") /* ErrorCallExpression */255;
|
||||
error("") /* ErrorCallExpression */255; 255; 42;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,10 @@ fun test(): Int {
|
||||
EQEQ(arg0 = y, arg1 = 42) -> 1
|
||||
y is String -> y /*as String */.<get-length>()
|
||||
y !is Int -> 2
|
||||
error("") /* ERROR CALL */y; -> 3
|
||||
error("") /* ERROR CALL */y; .not() -> 4
|
||||
error("") /* ErrorCallExpression */y; -> 3
|
||||
error("") /* ErrorCallExpression */y; .not() -> 4
|
||||
else -> -1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user