aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/typecheck.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/typecheck/typecheck.go')
-rw-r--r--src/cmd/compile/internal/typecheck/typecheck.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/typecheck/typecheck.go b/src/cmd/compile/internal/typecheck/typecheck.go
index 647465af4f..548c1af85c 100644
--- a/src/cmd/compile/internal/typecheck/typecheck.go
+++ b/src/cmd/compile/internal/typecheck/typecheck.go
@@ -482,7 +482,9 @@ func typecheck1(n ir.Node, top int) ir.Node {
case ir.OLITERAL:
if n.Sym() == nil && n.Type() == nil {
- base.Fatalf("literal missing type: %v", n)
+ if !n.Diag() {
+ base.Fatalf("literal missing type: %v", n)
+ }
}
return n