aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/consts.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/compiler/consts.go')
-rw-r--r--pkg/compiler/consts.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/compiler/consts.go b/pkg/compiler/consts.go
index 7b9c89901..e57d599cb 100644
--- a/pkg/compiler/consts.go
+++ b/pkg/compiler/consts.go
@@ -201,10 +201,9 @@ func (comp *compiler) patchConsts(consts0 map[string]uint64) {
consts[name] = val
}
for _, decl := range comp.desc.Nodes {
- switch decl.(type) {
+ switch n := decl.(type) {
case *ast.IntFlags:
// Unsupported flag values are dropped.
- n := decl.(*ast.IntFlags)
var values []*ast.Int
for _, v := range n.Values {
if comp.patchIntConst(v, consts, nil) {