| ... | @@ -1391,6 +1391,10 @@ fn transformExpression( | ... | @@ -1391,6 +1391,10 @@ fn transformExpression( |
| 1391 | array_init.slice(&t.ast), | 1391 | array_init.slice(&t.ast), |
| 1392 | ) orelse return null; | 1392 | ) orelse return null; |
| 1393 | | 1393 | |
| | 1394 | if (array_type == null and items.len == 0) { |
| | 1395 | return .empty_array; |
| | 1396 | } |
| | 1397 | |
| 1394 | return try t.addRef(.array_init, .{ | 1398 | return try t.addRef(.array_init, .{ |
| 1395 | .src_node = ctx.nodeOffset(node), | 1399 | .src_node = ctx.nodeOffset(node), |
| 1396 | .extra_index = try t.extra.append(t.gpa, Teg.ArrayInit, .{ | 1400 | .extra_index = try t.extra.append(t.gpa, Teg.ArrayInit, .{ |