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 e7d4e81672..240f0409e7 100644 --- a/src/cmd/compile/internal/typecheck/typecheck.go +++ b/src/cmd/compile/internal/typecheck/typecheck.go @@ -433,8 +433,8 @@ func typecheck(n ir.Node, top int) (res ir.Node) { case top&ctxType == 0 && n.Op() == ir.OTYPE && t != nil: if !n.Type().Broke() { base.Errorf("type %v is not an expression", n.Type()) + n.SetDiag(true) } - n.SetType(nil) case top&(ctxStmt|ctxExpr) == ctxStmt && !isStmt && t != nil: if !n.Diag() { |