From: Emmanuel Odeke Date: Tue, 31 Oct 2017 05:44:14 +0000 (-0700) Subject: cmd/compile: test for omitted ICE diagnostics after normal messages X-Git-Tag: go1.10beta1~389 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0ba4eba8645258f5f2a572ded7c673d2c24c881e;p=gostls13.git cmd/compile: test for omitted ICE diagnostics after normal messages 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 TryBot-Result: Gobot Gobot Reviewed-by: Matthew Dempsky --- diff --git a/test/fixedbugs/issue22389.go b/test/fixedbugs/issue22389.go new file mode 100644 index 0000000000..706b44941c --- /dev/null +++ b/test/fixedbugs/issue22389.go @@ -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" +}