mirror of
https://github.com/golang/go
synced 2024-11-12 12:50:28 -07:00
ca8e17164e
The list of conflicted files for this merge is: src/cmd/compile/internal/gc/inl.go src/cmd/compile/internal/gc/order.go src/cmd/compile/internal/gc/ssa.go test/fixedbugs/issue20415.go test/fixedbugs/issue22822.go test/fixedbugs/issue28079b.go inl.go was updated for changes on dev.regabi: namely that OSELRECV has been removed, and that OSELRECV2 now only uses List, rather than both Left and List. order.go was updated IsAutoTmp is now a standalone function, rather than a method on Node. ssa.go was similarly updated for new APIs involving package ir. The tests are all merging upstream additions for gccgo error messages with changes to cmd/compile's error messages on the dev.regabi branch. Change-Id: Icaaf186d69da791b5994dbb6688ec989caabec42
34 lines
599 B
Go
34 lines
599 B
Go
// 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.
|
|
|
|
// Make sure redeclaration errors report correct position.
|
|
|
|
package p
|
|
|
|
// 1
|
|
var f byte
|
|
|
|
var f interface{} // ERROR "issue20415.go:12: previous declaration|redefinition"
|
|
|
|
func _(f int) {
|
|
}
|
|
|
|
// 2
|
|
var g byte
|
|
|
|
func _(g int) {
|
|
}
|
|
|
|
var g interface{} // ERROR "issue20415.go:20: previous declaration|redefinition"
|
|
|
|
// 3
|
|
func _(h int) {
|
|
}
|
|
|
|
var h byte
|
|
|
|
var h interface{} // ERROR "issue20415.go:31: previous declaration|redefinition"
|