aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder/stencil.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/noder/stencil.go')
-rw-r--r--src/cmd/compile/internal/noder/stencil.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/noder/stencil.go b/src/cmd/compile/internal/noder/stencil.go
index cf8641d60e..23f53bac04 100644
--- a/src/cmd/compile/internal/noder/stencil.go
+++ b/src/cmd/compile/internal/noder/stencil.go
@@ -912,6 +912,12 @@ func (subst *subster) node(n ir.Node) ir.Node {
if v := subst.ts.Vars[x.(*ir.Name)]; v != nil {
return v
}
+ if ir.IsBlank(x) {
+ // Special case, because a blank local variable is
+ // not in the fn.Dcl list.
+ m := ir.NewNameAt(x.Pos(), ir.BlankNode.Sym())
+ return typed(subst.ts.Typ(x.Type()), m)
+ }
return x
case ir.ONONAME:
// This handles the identifier in a type switch guard