diff --git a/tests/expectations/compiler/statements/expr_statement.out b/tests/expectations/compiler/statements/expr_statement.out new file mode 100644 index 0000000000..0c159c636e --- /dev/null +++ b/tests/expectations/compiler/statements/expr_statement.out @@ -0,0 +1,10 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: c28f468593720c06ddad09b051dd5011a0060b5639dc261ea9a7bb53014e4fe0 + unrolled_ast: c28f468593720c06ddad09b051dd5011a0060b5639dc261ea9a7bb53014e4fe0 + ssa_ast: 404dfd8f09e6b5bc34aed38b49415b522817cd2e2b644f1fc4883e5d827b748a + flattened_ast: 118c0515b8bdc861c3870a15bb5a98662c888f0388715bb87298425321ccacf3 diff --git a/tests/expectations/compiler/statements/expr_statement_fail.out b/tests/expectations/compiler/statements/expr_statement_fail.out new file mode 100644 index 0000000000..97a1c06c0c --- /dev/null +++ b/tests/expectations/compiler/statements/expr_statement_fail.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EAST0372006]: function `foo` shadowed by\n --> compiler-test:9:46\n |\n 9 | transition foo(flag: bool, a: u8, b: u8, foo: Foo, i: i8) -> u8 {\n | ^^^\nError [ETYC0372059]: An expression statement must be a function call.\n --> compiler-test:10:9\n |\n 10 | a + b;\n | ^^^^^^\nError [ETYC0372059]: An expression statement must be a function call.\n --> compiler-test:11:9\n |\n 11 | flag ? a : b;\n | ^^^^^^^^^^^^^\nError [ETYC0372059]: An expression statement must be a function call.\n --> compiler-test:12:9\n |\n 12 | foo.a;\n | ^^^^^^\nError [ETYC0372059]: An expression statement must be a function call.\n --> compiler-test:13:9\n |\n 13 | Foo {\n 14 | a: a,\n 15 | };\n | ^^\nError [ETYC0372059]: An expression statement must be a function call.\n --> compiler-test:16:9\n |\n 16 | a;\n | ^^\nError [ETYC0372059]: An expression statement must be a function call.\n --> compiler-test:17:9\n |\n 17 | 1u8;\n | ^^^^\nError [ETYC0372059]: An expression statement must be a function call.\n --> compiler-test:18:9\n |\n 18 | -i8;\n | ^^^^\nError [ETYC0372059]: An expression statement must be a function call.\n --> compiler-test:19:9\n |\n 19 | ();\n | ^^^\n"