aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cmd/compile/internal/noder/noder.go3
-rw-r--r--test/fixedbugs/bug050.go2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/noder/noder.go b/src/cmd/compile/internal/noder/noder.go
index d692bf97aa..8c456e4561 100644
--- a/src/cmd/compile/internal/noder/noder.go
+++ b/src/cmd/compile/internal/noder/noder.go
@@ -68,6 +68,9 @@ func LoadPackage(filenames []string) {
for e := range p.err {
p.errorAt(e.Pos, "%s", e.Msg)
}
+ if p.file == nil {
+ base.ErrorExit()
+ }
lines += p.file.EOF.Line()
}
base.Timer.AddEvent(int64(lines), "lines")
diff --git a/test/fixedbugs/bug050.go b/test/fixedbugs/bug050.go
index aba68b1dcb..1e299ed99a 100644
--- a/test/fixedbugs/bug050.go
+++ b/test/fixedbugs/bug050.go
@@ -1,4 +1,4 @@
-// errorcheck
+// errorcheck -d=panic
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style