| ... | @@ -436,7 +436,7 @@ pub fn expr(mod: *Module, scope: *Scope, rl: ResultLoc, node: ast.Node.Index) In | ... | @@ -436,7 +436,7 @@ pub fn expr(mod: *Module, scope: *Scope, rl: ResultLoc, node: ast.Node.Index) In |
| 436 | .@"for" => return forExpr(mod, scope, rl, node, tree.forFull(node)), | 436 | .@"for" => return forExpr(mod, scope, rl, node, tree.forFull(node)), |
| 437 | | 437 | |
| 438 | .slice_open => { | 438 | .slice_open => { |
| 439 | const lhs = try expr(mod, scope, .{ .ty = .usize_type }, node_datas[node].lhs); | 439 | const lhs = try expr(mod, scope, .ref, node_datas[node].lhs); |
| 440 | const start = try expr(mod, scope, .{ .ty = .usize_type }, node_datas[node].rhs); | 440 | const start = try expr(mod, scope, .{ .ty = .usize_type }, node_datas[node].rhs); |
| 441 | const result = try gz.addPlNode(.slice_start, node, zir.Inst.SliceStart{ | 441 | const result = try gz.addPlNode(.slice_start, node, zir.Inst.SliceStart{ |
| 442 | .lhs = lhs, | 442 | .lhs = lhs, |
| ... | @@ -445,7 +445,7 @@ pub fn expr(mod: *Module, scope: *Scope, rl: ResultLoc, node: ast.Node.Index) In | ... | @@ -445,7 +445,7 @@ pub fn expr(mod: *Module, scope: *Scope, rl: ResultLoc, node: ast.Node.Index) In |
| 445 | return rvalue(mod, scope, rl, result, node); | 445 | return rvalue(mod, scope, rl, result, node); |
| 446 | }, | 446 | }, |
| 447 | .slice => { | 447 | .slice => { |
| 448 | const lhs = try expr(mod, scope, .{ .ty = .usize_type }, node_datas[node].lhs); | 448 | const lhs = try expr(mod, scope, .ref, node_datas[node].lhs); |
| 449 | const extra = tree.extraData(node_datas[node].rhs, ast.Node.Slice); | 449 | const extra = tree.extraData(node_datas[node].rhs, ast.Node.Slice); |
| 450 | const start = try expr(mod, scope, .{ .ty = .usize_type }, extra.start); | 450 | const start = try expr(mod, scope, .{ .ty = .usize_type }, extra.start); |
| 451 | const end = try expr(mod, scope, .{ .ty = .usize_type }, extra.end); | 451 | const end = try expr(mod, scope, .{ .ty = .usize_type }, extra.end); |
| ... | @@ -457,7 +457,7 @@ pub fn expr(mod: *Module, scope: *Scope, rl: ResultLoc, node: ast.Node.Index) In | ... | @@ -457,7 +457,7 @@ pub fn expr(mod: *Module, scope: *Scope, rl: ResultLoc, node: ast.Node.Index) In |
| 457 | return rvalue(mod, scope, rl, result, node); | 457 | return rvalue(mod, scope, rl, result, node); |
| 458 | }, | 458 | }, |
| 459 | .slice_sentinel => { | 459 | .slice_sentinel => { |
| 460 | const lhs = try expr(mod, scope, .{ .ty = .usize_type }, node_datas[node].lhs); | 460 | const lhs = try expr(mod, scope, .ref, node_datas[node].lhs); |
| 461 | const extra = tree.extraData(node_datas[node].rhs, ast.Node.SliceSentinel); | 461 | const extra = tree.extraData(node_datas[node].rhs, ast.Node.SliceSentinel); |
| 462 | const start = try expr(mod, scope, .{ .ty = .usize_type }, extra.start); | 462 | const start = try expr(mod, scope, .{ .ty = .usize_type }, extra.start); |
| 463 | const end = try expr(mod, scope, .{ .ty = .usize_type }, extra.end); | 463 | const end = try expr(mod, scope, .{ .ty = .usize_type }, extra.end); |