| author | |
| committer | |
| log | a7c3cec65f1639195e787b98900c3f126953f880 |
| tree | aa1088b140e821e80dd81e16ee8cfc8fd8bbd5c2 |
| parent | 4696cd3e09c4e33519dbb53a41c32bbdfd97f6f6 |
2 files changed, 6 insertions(+), 1 deletions(-)
src/ir.cpp+1-1| ... | ... | @@ -20317,7 +20317,7 @@ static IrInstGen *ir_analyze_fn_call(IrAnalyze *ira, IrInst* source_instr, |
| 20317 | 20317 | } |
| 20318 | 20318 | |
| 20319 | 20319 | IrInstGen *first_arg; |
| 20320 | if (!first_arg_known_bare && handle_is_ptr(ira->codegen, first_arg_ptr->value->type->data.pointer.child_type)) { | |
| 20320 | if (!first_arg_known_bare) { | |
| 20321 | 20321 | first_arg = first_arg_ptr; |
| 20322 | 20322 | } else { |
| 20323 | 20323 | first_arg = ir_get_deref(ira, &first_arg_ptr->base, first_arg_ptr, nullptr); |
test/stage1/behavior/enum.zig+5| ... | ... | @@ -1150,10 +1150,15 @@ test "method call on an enum" { |
| 1150 | 1150 | fn method(self: *E) bool { |
| 1151 | 1151 | return self.* == .two; |
| 1152 | 1152 | } |
| 1153 | ||
| 1154 | fn generic_method(self: *E, foo: anytype) bool { | |
| 1155 | return self.* == .two and foo == bool; | |
| 1156 | } | |
| 1153 | 1157 | }; |
| 1154 | 1158 | fn doTheTest() void { |
| 1155 | 1159 | var e = E.two; |
| 1156 | 1160 | expect(e.method()); |
| 1161 | expect(e.generic_method(bool)); | |
| 1157 | 1162 | } |
| 1158 | 1163 | }; |
| 1159 | 1164 | S.doTheTest(); |