| author | |
| committer | |
| log | 28d59decc157620157d0c1678600670becf50c73 |
| tree | 863522dbc1b108329dfe4517db442355e63dc9d7 |
| parent | 0db34290459c0011db8da43908d0b5fda7b38ad3 |
| signature | Commit is signed but in an unrecognized format. |
3 files changed, 3 insertions(+), 2 deletions(-)
CHANGELOG.md+1| ... | ... | @@ -1,6 +1,7 @@ |
| 1 | 1 | ## 0.1.6 |
| 2 | 2 | |
| 3 | 3 | - fix: crash when printing unused struct declaration error |
| 4 | - fix: provide array result type to sema | |
| 4 | 5 | |
| 5 | 6 | ## 0.1.5 |
| 6 | 7 |
src/core/Sema.zig+1-1| ... | ... | @@ -875,7 +875,7 @@ fn analyzeCodeInner(s: *Sema, in: Teg.Inst.Index) Error!Air.Inst.Ref { |
| 875 | 875 | .array_init => { |
| 876 | 876 | const node: Teg.ArrayInit = s.code.instPayload(.array_init, in); |
| 877 | 877 | |
| 878 | assert(node.list.len > 0); | |
| 878 | assert(node.list.len > 0 or node.type_hint.unwrap() != null); | |
| 879 | 879 | |
| 880 | 880 | const scratch = try s.scratch.reserve(s.arena, Air.Inst.Ref, node.list.len); |
| 881 | 881 | defer scratch.deinit(); |
src/core/Transform.zig+1-1| ... | ... | @@ -1394,7 +1394,7 @@ fn transformExpression( |
| 1394 | 1394 | return try t.addRef(.array_init, .{ |
| 1395 | 1395 | .src_node = ctx.nodeOffset(node), |
| 1396 | 1396 | .extra_index = try t.extra.append(t.gpa, Teg.ArrayInit, .{ |
| 1397 | .type_hint = .none, | |
| 1397 | .type_hint = if (array_type) |ty| ty.toOptional() else .none, | |
| 1398 | 1398 | .list = items, |
| 1399 | 1399 | }), |
| 1400 | 1400 | }); |