mirror of
https://github.com/golang/go
synced 2024-11-27 03:31:29 -07:00
5e954047bc
Avoid construction of incorrect syntax trees in presence of errors. For #19663. Change-Id: I43025a3cf0fe02cae9a57e8bb9489b5f628c3fd7 Reviewed-on: https://go-review.googlesource.com/38604 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
18 lines
337 B
Go
18 lines
337 B
Go
// errorcheck
|
|
|
|
// Copyright 2009 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.
|
|
|
|
// Used to crash
|
|
// https://golang.org/issue/204
|
|
|
|
package main
|
|
|
|
func () x() // ERROR "no receiver"
|
|
|
|
func (a b, c d) x() // ERROR "multiple receiver"
|
|
|
|
type b int
|
|
|