diff options
Diffstat (limited to 'src/cmd/compile/internal/typecheck/typecheck.go')
-rw-r--r-- | src/cmd/compile/internal/typecheck/typecheck.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/typecheck/typecheck.go b/src/cmd/compile/internal/typecheck/typecheck.go index 030158b1a1..647465af4f 100644 --- a/src/cmd/compile/internal/typecheck/typecheck.go +++ b/src/cmd/compile/internal/typecheck/typecheck.go @@ -876,7 +876,7 @@ func typecheck1(n ir.Node, top int) ir.Node { case ir.OTYPESW: n := n.(*ir.TypeSwitchGuard) base.Errorf("use of .(type) outside type switch") - n.SetType(nil) + n.SetDiag(true) return n case ir.ODCLFUNC: |