| author | |
| committer | |
| log | 4cde6dd10902ebeec3b3000b76d6395c49f5a241 |
| tree | e2bcced0dfd1d3ad71ccf8625d6b72f78261649b |
| parent | 4f200eda9f055425ad3163d9be7ee43a057f7f2f |
19 files changed, 29 insertions(+), 30 deletions(-)
test/cases/bad_inferred_variable_type.zig+1| ... | @@ -5,5 +5,6 @@ pub fn main() void { | ... | @@ -5,5 +5,6 @@ pub fn main() void { |
| 5 | 5 | ||
| 6 | // error | 6 | // error |
| 7 | // output_mode=Exe | 7 | // output_mode=Exe |
| 8 | // backend=stage2 | ||
| 8 | // | 9 | // |
| 9 | // :2:9: error: variable of type '@TypeOf(null)' must be const or comptime | 10 | // :2:9: error: variable of type '@TypeOf(null)' must be const or comptime |
test/cases/compile_errors/addition_with_non_numbers.zig+1-1| ... | @@ -6,7 +6,7 @@ const x = Foo {.field = 1} + Foo {.field = 2}; | ... | @@ -6,7 +6,7 @@ const x = Foo {.field = 1} + Foo {.field = 2}; |
| 6 | export fn entry() usize { return @sizeOf(@TypeOf(x)); } | 6 | export fn entry() usize { return @sizeOf(@TypeOf(x)); } |
| 7 | 7 | ||
| 8 | // error | 8 | // error |
| 9 | // backend=stage2 | 9 | // backend=llvm |
| 10 | // target=native | 10 | // target=native |
| 11 | // | 11 | // |
| 12 | // :4:28: error: invalid operands to binary expression: 'Struct' and 'Struct' | 12 | // :4:28: error: invalid operands to binary expression: 'Struct' and 'Struct' |
test/cases/compile_errors/cast_negative_value_to_unsigned_integer.zig+1-1| ... | @@ -10,7 +10,7 @@ export fn entry1() void { | ... | @@ -10,7 +10,7 @@ export fn entry1() void { |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | // error | 12 | // error |
| 13 | // backend=stage2 | 13 | // backend=llvm |
| 14 | // target=native | 14 | // target=native |
| 15 | // | 15 | // |
| 16 | // :3:36: error: type 'u32' cannot represent integer value '-1' | 16 | // :3:36: error: type 'u32' cannot represent integer value '-1' |
test/cases/compile_errors/compile_log_statement_warning_deduplication_in_generic_fn.zig+1-1| ... | @@ -8,7 +8,7 @@ fn inner(comptime n: usize) void { | ... | @@ -8,7 +8,7 @@ fn inner(comptime n: usize) void { |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | // error | 10 | // error |
| 11 | // backend=stage2 | 11 | // backend=llvm |
| 12 | // target=native | 12 | // target=native |
| 13 | // | 13 | // |
| 14 | // :7:39: error: found compile log statement | 14 | // :7:39: error: found compile log statement |
test/cases/compile_errors/endless_loop_in_function_evaluation.zig deleted-14| ... | @@ -1,14 +0,0 @@ | ||
| 1 | const seventh_fib_number = fibonacci(7); | ||
| 2 | fn fibonacci(x: i32) i32 { | ||
| 3 | return fibonacci(x - 1) + fibonacci(x - 2); | ||
| 4 | } | ||
| 5 | |||
| 6 | export fn entry() usize { return @sizeOf(@TypeOf(seventh_fib_number)); } | ||
| 7 | |||
| 8 | // error | ||
| 9 | // backend=stage2 | ||
| 10 | // target=native | ||
| 11 | // | ||
| 12 | // :3:21: error: evaluation exceeded 1000 backwards branches | ||
| 13 | // :3:21: note: called from here (999 times) | ||
| 14 | // :1:37: note: called from here | ||
test/cases/compile_errors/exceeded_maximum_bit_width_of_integer.zig+1-1| ... | @@ -8,7 +8,7 @@ export fn entry2() void { | ... | @@ -8,7 +8,7 @@ export fn entry2() void { |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | // error | 10 | // error |
| 11 | // backend=stage2 | 11 | // backend=llvm |
| 12 | // target=native | 12 | // target=native |
| 13 | // | 13 | // |
| 14 | // :2:15: error: primitive integer type 'u65536' exceeds maximum bit width of 65535 | 14 | // :2:15: error: primitive integer type 'u65536' exceeds maximum bit width of 65535 |
test/cases/compile_errors/export_with_empty_name_string.zig+1-1| ... | @@ -4,7 +4,7 @@ comptime { | ... | @@ -4,7 +4,7 @@ comptime { |
| 4 | } | 4 | } |
| 5 | 5 | ||
| 6 | // error | 6 | // error |
| 7 | // backend=stage2 | 7 | // backend=llvm |
| 8 | // target=native | 8 | // target=native |
| 9 | // | 9 | // |
| 10 | // :3:21: error: exported symbol name cannot be empty | 10 | // :3:21: error: exported symbol name cannot be empty |
test/cases/compile_errors/fieldParentPtr-non_struct.zig+1-1| ... | @@ -4,7 +4,7 @@ export fn foo(a: *i32) *Foo { | ... | @@ -4,7 +4,7 @@ export fn foo(a: *i32) *Foo { |
| 4 | } | 4 | } |
| 5 | 5 | ||
| 6 | // error | 6 | // error |
| 7 | // backend=stage2 | 7 | // backend=llvm |
| 8 | // target=native | 8 | // target=native |
| 9 | // | 9 | // |
| 10 | // :3:28: error: expected struct type, found 'i32' | 10 | // :3:28: error: expected struct type, found 'i32' |
test/cases/compile_errors/function_call_assigned_to_incorrect_type.zig+1-1| ... | @@ -7,7 +7,7 @@ fn concat() [16]f32 { | ... | @@ -7,7 +7,7 @@ fn concat() [16]f32 { |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | // error | 9 | // error |
| 10 | // backend=stage2 | 10 | // backend=llvm |
| 11 | // target=native | 11 | // target=native |
| 12 | // | 12 | // |
| 13 | // :3:17: error: expected type '[4]f32', found '[16]f32' | 13 | // :3:17: error: expected type '[4]f32', found '[16]f32' |
test/cases/compile_errors/function_prototype_with_no_body.zig+1-1| ... | @@ -4,7 +4,7 @@ export fn entry() void { | ... | @@ -4,7 +4,7 @@ export fn entry() void { |
| 4 | } | 4 | } |
| 5 | 5 | ||
| 6 | // error | 6 | // error |
| 7 | // backend=stage2 | 7 | // backend=llvm |
| 8 | // target=native | 8 | // target=native |
| 9 | // | 9 | // |
| 10 | // :1:1: error: non-extern function has no body | 10 | // :1:1: error: non-extern function has no body |
test/cases/compile_errors/int_to_err_non_global_invalid_number.zig+1-1| ... | @@ -13,7 +13,7 @@ comptime { | ... | @@ -13,7 +13,7 @@ comptime { |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | // error | 15 | // error |
| 16 | // backend=stage2 | 16 | // backend=llvm |
| 17 | // target=native | 17 | // target=native |
| 18 | // | 18 | // |
| 19 | // :11:13: error: 'error.B' not a member of error set 'error{A,C}' | 19 | // :11:13: error: 'error.B' not a member of error set 'error{A,C}' |
test/cases/compile_errors/invalid_struct_field.zig+1-1| ... | @@ -18,4 +18,4 @@ export fn g() void { | ... | @@ -18,4 +18,4 @@ export fn g() void { |
| 18 | // :4:7: error: no field named 'foo' in struct 'tmp.A' | 18 | // :4:7: error: no field named 'foo' in struct 'tmp.A' |
| 19 | // :1:11: note: struct declared here | 19 | // :1:11: note: struct declared here |
| 20 | // :10:17: error: no field named 'bar' in struct 'tmp.A' | 20 | // :10:17: error: no field named 'bar' in struct 'tmp.A' |
| 21 | // :1:11: note: struct declared here | 21 |
test/cases/compile_errors/invalid_underscore_placement_in_int_literal-1.zig+1-1| ... | @@ -4,7 +4,7 @@ fn main() void { | ... | @@ -4,7 +4,7 @@ fn main() void { |
| 4 | } | 4 | } |
| 5 | 5 | ||
| 6 | // error | 6 | // error |
| 7 | // backend=stage2 | 7 | // backend=llvm |
| 8 | // target=native | 8 | // target=native |
| 9 | // | 9 | // |
| 10 | // :2:21: error: expected expression, found 'invalid bytes' | 10 | // :2:21: error: expected expression, found 'invalid bytes' |
test/cases/compile_errors/ptrcast_to_non-pointer.zig+1-1| ... | @@ -3,7 +3,7 @@ export fn entry(a: *i32) usize { | ... | @@ -3,7 +3,7 @@ export fn entry(a: *i32) usize { |
| 3 | } | 3 | } |
| 4 | 4 | ||
| 5 | // error | 5 | // error |
| 6 | // backend=stage2 | 6 | // backend=llvm |
| 7 | // target=native | 7 | // target=native |
| 8 | // | 8 | // |
| 9 | // :2:21: error: expected pointer type, found 'usize' | 9 | // :2:21: error: expected pointer type, found 'usize' |
test/cases/compile_errors/reassign_to_array_parameter.zig+1-1| ... | @@ -6,7 +6,7 @@ export fn entry() void { | ... | @@ -6,7 +6,7 @@ export fn entry() void { |
| 6 | } | 6 | } |
| 7 | 7 | ||
| 8 | // error | 8 | // error |
| 9 | // backend=stage2 | 9 | // backend=llvm |
| 10 | // target=native | 10 | // target=native |
| 11 | // | 11 | // |
| 12 | // :2:15: error: cannot assign to constant | 12 | // :2:15: error: cannot assign to constant |
test/cases/compile_errors/reassign_to_slice_parameter.zig+1-1| ... | @@ -6,7 +6,7 @@ export fn entry() void { | ... | @@ -6,7 +6,7 @@ export fn entry() void { |
| 6 | } | 6 | } |
| 7 | 7 | ||
| 8 | // error | 8 | // error |
| 9 | // backend=stage2 | 9 | // backend=llvm |
| 10 | // target=native | 10 | // target=native |
| 11 | // | 11 | // |
| 12 | // :2:10: error: cannot assign to constant | 12 | // :2:10: error: cannot assign to constant |
test/cases/compile_errors/stage1/obj/endless_loop_in_function_evaluation.zig created+12| ... | @@ -0,0 +1,12 @@ | ||
| 1 | const seventh_fib_number = fibonacci(7); | ||
| 2 | fn fibonacci(x: i32) i32 { | ||
| 3 | return fibonacci(x - 1) + fibonacci(x - 2); | ||
| 4 | } | ||
| 5 | |||
| 6 | export fn entry() usize { return @sizeOf(@TypeOf(seventh_fib_number)); } | ||
| 7 | |||
| 8 | // error | ||
| 9 | // backend=stage1 | ||
| 10 | // target=native | ||
| 11 | // | ||
| 12 | // tmp.zig:3:21: error: evaluation exceeded 1000 backwards branches | ||
test/cases/compile_errors/suspend_inside_suspend_block.zig+1-1| ... | @@ -9,7 +9,7 @@ fn foo() void { | ... | @@ -9,7 +9,7 @@ fn foo() void { |
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | // error | 11 | // error |
| 12 | // backend=stage2 | 12 | // backend=llvm |
| 13 | // target=native | 13 | // target=native |
| 14 | // | 14 | // |
| 15 | // :6:9: error: cannot suspend inside suspend block | 15 | // :6:9: error: cannot suspend inside suspend block |
test/cases/compile_errors/switch_expression-unreachable_else_prong_enum.zig+1-1| ... | @@ -18,7 +18,7 @@ fn foo(x: u8) void { | ... | @@ -18,7 +18,7 @@ fn foo(x: u8) void { |
| 18 | export fn entry() usize { return @sizeOf(@TypeOf(&foo)); } | 18 | export fn entry() usize { return @sizeOf(@TypeOf(&foo)); } |
| 19 | 19 | ||
| 20 | // error | 20 | // error |
| 21 | // backend=stage2 | 21 | // backend=llvm |
| 22 | // target=native | 22 | // target=native |
| 23 | // | 23 | // |
| 24 | // :14:14: error: unreachable else prong; all cases already handled | 24 | // :14:14: error: unreachable else prong; all cases already handled |