mirror of
https://github.com/golang/go
synced 2024-11-15 12:20:32 -07:00
[dev.typeparams] cmd/compile/internal/types2: review of initorder.go
Difference: errorf now accepts any value that implements the poser interface in place of a position argument. All types2 Objects implement poser. type poser interface { Pos() syntax.Pos } f=initorder.go; diff $f ../../../../go/types/$f 5c5 < package types2 --- > package types 154c154 < check.errorf(obj, "initialization cycle for %s", obj.Name()) --- > check.errorf(obj.Pos(), "initialization cycle for %s", obj.Name()) 157c157 < check.errorf(obj, "\t%s refers to", obj.Name()) // secondary error, \t indented --- > check.errorf(obj.Pos(), "\t%s refers to", obj.Name()) // secondary error, \t indented 161c161 < check.errorf(obj, "\t%s", obj.Name()) --- > check.errorf(obj.Pos(), "\t%s", obj.Name()) Change-Id: Id85074fd15a04bb4ff6e8b68a44be6ac5919c71a Reviewed-on: https://go-review.googlesource.com/c/go/+/265678 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
parent
38af45b4cb
commit
6e98406ac3
@ -1,4 +1,3 @@
|
|||||||
// UNREVIEWED
|
|
||||||
// Copyright 2014 The Go Authors. All rights reserved.
|
// Copyright 2014 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
Loading…
Reference in New Issue
Block a user