| ... | @@ -572,28 +572,6 @@ test "inlined loop has array literal with elided runtime scope on first iteratio | ... | @@ -572,28 +572,6 @@ test "inlined loop has array literal with elided runtime scope on first iteratio |
| 572 | } | 572 | } |
| 573 | } | 573 | } |
| 574 | | 574 | |
| 575 | test "call method on bound fn referring to var instance" { | | |
| 576 | if (builtin.zig_backend != .stage1) { | | |
| 577 | // Let's delay solving this one; I want to try to eliminate bound functions from | | |
| 578 | // the language. | | |
| 579 | return error.SkipZigTest; // TODO | | |
| 580 | } | | |
| 581 | | | |
| 582 | try expect(bound_fn() == 1237); | | |
| 583 | } | | |
| 584 | | | |
| 585 | const SimpleStruct = struct { | | |
| 586 | field: i32, | | |
| 587 | | | |
| 588 | fn method(self: *const SimpleStruct) i32 { | | |
| 589 | return self.field + 3; | | |
| 590 | } | | |
| 591 | }; | | |
| 592 | | | |
| 593 | var simple_struct = SimpleStruct{ .field = 1234 }; | | |
| 594 | | | |
| 595 | const bound_fn = simple_struct.method; | | |
| 596 | | | |
| 597 | test "ptr to local array argument at comptime" { | 575 | test "ptr to local array argument at comptime" { |
| 598 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 576 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 599 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 577 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |