From 52aa5b9f2d11c825f094eed1f0b2950432daf03f Mon Sep 17 00:00:00 2001 From: visualfc Date: Mon, 8 Mar 2021 12:16:01 +0800 Subject: [PATCH] cl: loadConst store ctx.syms skip _ --- cl/compile.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cl/compile.go b/cl/compile.go index e9388f12f..78a2740e2 100644 --- a/cl/compile.go +++ b/cl/compile.go @@ -381,7 +381,9 @@ func loadConst(ctx *blockCtx, name string, typ ast.Expr, value ast.Expr) { c.v = v c.kind = t.Kind() } - ctx.syms[name] = c + if name != "_" { + ctx.syms[name] = c + } } func loadVar(ctx *blockCtx, name string, typ ast.Expr, value ast.Expr) {