Skip to content

Commit 3c85e35

Browse files
committed
v2: ssa fix
1 parent 47593c8 commit 3c85e35

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎vlib/v2/ssa/builder.v‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6657,8 +6657,7 @@ fn (mut b Builder) build_go_or_spawn(expr ast.Expr, opcode OpCode) ValueID {
66576657
operands << arg_val
66586658
}
66596659

6660-
void_t := b.mod.type_store.get_void()
6661-
return b.mod.add_instr(opcode, b.cur_block, void_t, operands)
6660+
return b.mod.add_instr(opcode, b.cur_block, TypeID(0), operands)
66626661
}
66636662
// Fallback: just build the expression (shouldn't happen for well-formed code)
66646663
return b.build_expr(expr)

‎vlib/v2/transformer/expr.v‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2742,8 +2742,9 @@ fn (mut t Transformer) lower_go_call(expr ast.KeywordOperator) ast.Expr {
27422742
mut receiver_expr := ast.empty_expr
27432743
mut receiver_type_name := ''
27442744
if call_lhs is ast.SelectorExpr {
2745-
sel_lhs := call_lhs.lhs
2746-
if !(sel_lhs is ast.Ident && t.is_module_name(sel_lhs.name)) {
2745+
sel := call_lhs as ast.SelectorExpr
2746+
sel_lhs := sel.lhs
2747+
if !(sel_lhs is ast.Ident && t.is_module_name((sel_lhs as ast.Ident).name)) {
27472748
is_method = true
27482749
receiver_expr = t.transform_expr(sel_lhs)
27492750
if recv_type := t.get_expr_type(sel_lhs) {

‎vlib/v2/transformer/transformer.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9141,7 +9141,7 @@ fn (mut t Transformer) generate_go_wrapper_functions() []ast.Stmt {
91419141
]
91429142
})
91439143
// _args.field = param for each field
9144-
for i, pname in info.param_names {
9144+
for _, pname in info.param_names {
91459145
dispatch_stmts << ast.Stmt(ast.AssignStmt{
91469146
op: .assign
91479147
lhs: [

0 commit comments

Comments
 (0)