[IR] update testdata: unify representation for error nodes
This commit is contained in:
committed by
teamcityserver
parent
ef9a901635
commit
7df6575a18
+3
-2
@@ -1,5 +1,5 @@
|
||||
fun f(f1: Function0<String> = local fun <anonymous>(): ErrorType /* ERROR */ {
|
||||
return error("") /* ERROR CALL */
|
||||
fun f(f1: Function0<String> = local fun <anonymous>(): ErrorType {
|
||||
return error("") /* ErrorCallExpression */
|
||||
}
|
||||
, f2: Function0<String> = local fun <anonymous>(): String {
|
||||
return "FAIL"
|
||||
@@ -23,3 +23,4 @@ fun box(): String {
|
||||
}
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
val test1: ErrorType /* ERROR */
|
||||
field = error("") /* ERROR CALL */
|
||||
val test1: ErrorType
|
||||
field = error("") /* ErrorCallExpression */
|
||||
get
|
||||
|
||||
val test2: ErrorType /* ERROR */
|
||||
field = error("") /* ERROR CALL */
|
||||
val test2: ErrorType
|
||||
field = error("") /* ErrorCallExpression */
|
||||
get
|
||||
|
||||
val test3: ErrorType /* ERROR */
|
||||
field = error("") /* ERROR CALL */56;
|
||||
val test3: ErrorType
|
||||
field = error("") /* ErrorCallExpression */56;
|
||||
get
|
||||
|
||||
val test4: ErrorType /* ERROR */
|
||||
field = error("") /* ERROR CALL */error("") /* ERROR EXPRESSION */;
|
||||
val test4: ErrorType
|
||||
field = error("") /* ErrorCallExpression */error("") /* ErrorExpression */;
|
||||
get
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
val test1: ErrorType /* ERROR */
|
||||
field = error("") /* ERROR CALL */
|
||||
val test1: ErrorType
|
||||
field = error("") /* ErrorCallExpression */
|
||||
get
|
||||
|
||||
val test2: ErrorType /* ERROR */
|
||||
field = error("") /* ERROR CALL */
|
||||
val test2: ErrorType
|
||||
field = error("") /* ErrorCallExpression */
|
||||
get
|
||||
|
||||
val test3: ErrorType /* ERROR */
|
||||
field = error("") /* ERROR CALL */42; 56;
|
||||
val test3: ErrorType
|
||||
field = error("") /* ErrorCallExpression */42; 56;
|
||||
get
|
||||
|
||||
val test4: ErrorType /* ERROR */
|
||||
field = error("") /* ERROR EXPRESSION */
|
||||
val test4: ErrorType
|
||||
field = error("") /* ErrorExpression */
|
||||
get
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@OptIn(markerClass = [ExperimentalTypeInference::class])
|
||||
fun <R : Any?> scopedFlow(@BuilderInference block: @ExtensionFunctionType @ExtensionFunctionType SuspendFunction2<CoroutineScope, FlowCollector<R>, Unit>): Flow<R> {
|
||||
return flow<R>(block = local suspend fun FlowCollector<R>.<anonymous>() {
|
||||
val collector: FlowCollector<ErrorType /* ERROR */> = <this>
|
||||
val collector: FlowCollector<ErrorType> = <this>
|
||||
flowScope<Unit>(block = local suspend fun CoroutineScope.<anonymous>() {
|
||||
block.invoke(p1 = <this>, p2 = collector)
|
||||
}
|
||||
@@ -12,7 +12,7 @@ fun <R : Any?> scopedFlow(@BuilderInference block: @ExtensionFunctionType @Exten
|
||||
|
||||
fun <T : Any?> Flow<T>.onCompletion(action: @ExtensionFunctionType @ExtensionFunctionType SuspendFunction2<FlowCollector<T>, Throwable?, Unit>): Flow<T> {
|
||||
return unsafeFlow<T>(block = local suspend fun FlowCollector<T>.<anonymous>() {
|
||||
val safeCollector: SafeCollector<ErrorType /* ERROR */> = SafeCollector<ErrorType /* ERROR */>(collector = <this>)
|
||||
val safeCollector: SafeCollector<ErrorType> = SafeCollector<ErrorType>(collector = <this>)
|
||||
safeCollector.invokeSafely<T>(action = action)
|
||||
}
|
||||
)
|
||||
@@ -27,9 +27,9 @@ inline fun <T : Any?> unsafeFlow(@BuilderInference crossinline block: @Extension
|
||||
}
|
||||
|
||||
@Deprecated(message = "binary compatibility with a version w/o FlowCollector receiver", level = DeprecationLevel.HIDDEN)
|
||||
fun <T : Any?> Flow<T>.onCompletion(action: SuspendFunction1<Throwable?, Unit>): ErrorType /* ERROR */ {
|
||||
return error("") /* ERROR CALL */local fun <anonymous>() {
|
||||
action.invoke(p1 = error("") /* ERROR CALL */)
|
||||
fun <T : Any?> Flow<T>.onCompletion(action: SuspendFunction1<Throwable?, Unit>): ErrorType {
|
||||
return error("") /* ErrorCallExpression */local fun <anonymous>() {
|
||||
action.invoke(p1 = error("") /* ErrorCallExpression */)
|
||||
}
|
||||
;
|
||||
}
|
||||
@@ -141,3 +141,4 @@ interface SendChannel<in E : Any?> {
|
||||
abstract suspend fun send(e: E)
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user