| ... | ... | @@ -1467,6 +1467,18 @@ fn function_with_return_type_type() { |
| 1467 | 1467 | ".tmp_source.zig:4:5: note: unable to evaluate this expression at compile time", |
| 1468 | 1468 | ".tmp_source.zig:3:32: note: required to be compile-time function because of return type 'type'"); |
| 1469 | 1469 | |
| 1470 | add_compile_fail_case("non pure function required to be pure", R"SOURCE( |
| 1471 | var a: i32 = 0; |
| 1472 | |
| 1473 | fn foo() { |
| 1474 | @setFnStaticEval(this, true); |
| 1475 | a = 1; |
| 1476 | } |
| 1477 | )SOURCE", 3, |
| 1478 | ".tmp_source.zig:4:1: error: failed to evaluate function at compile time", |
| 1479 | ".tmp_source.zig:6:5: note: unable to evaluate this expression at compile time", |
| 1480 | ".tmp_source.zig:5:5: note: required to be compile-time function here"); |
| 1481 | |
| 1470 | 1482 | add_compile_fail_case("bogus method call on slice", R"SOURCE( |
| 1471 | 1483 | fn f(m: []const u8) { |
| 1472 | 1484 | m.copy(u8, self.list.items[old_len...], m); |