]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: test for omitted ICE diagnostics after normal messages
authorEmmanuel Odeke <emm.odeke@gmail.com>
Tue, 31 Oct 2017 05:44:14 +0000 (22:44 -0700)
committerEmmanuel Odeke <emm.odeke@gmail.com>
Mon, 6 Nov 2017 08:37:30 +0000 (08:37 +0000)
Updates #22389

@mdempsky's CL 70850 fixed the unnecessary
compile stack trace printing during ICE diagnostics.

This CL adds a test to lock in this behavior.

Change-Id: I9ce49923c80b78cb8c0bb5dc4af3c860a43d63ba
Reviewed-on: https://go-review.googlesource.com/74630
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
test/fixedbugs/issue22389.go [new file with mode: 0644]

diff --git a/test/fixedbugs/issue22389.go b/test/fixedbugs/issue22389.go
new file mode 100644 (file)
index 0000000..706b449
--- /dev/null
@@ -0,0 +1,18 @@
+// errorcheck
+
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type Foo struct{}
+
+func (f *Foo) Call(cb func(*Foo)) {
+       cb(f)
+}
+
+func main() {
+       f := &Foo{}
+       f.Call(func(f) {}) // ERROR "f is not a type"
+}