mirror of
https://github.com/golang/go
synced 2024-09-05 07:54:46 +00:00
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 <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
9f3991714a
commit
0ba4eba864
18
test/fixedbugs/issue22389.go
Normal file
18
test/fixedbugs/issue22389.go
Normal file
|
@ -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"
|
||||
}
|
Loading…
Reference in a new issue