1
0
mirror of https://github.com/golang/go synced 2024-11-15 10:30:54 -07:00
The Go programming language
Go to file
Robert Griesemer 6e98406ac3 [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>
2020-10-27 23:30:32 +00:00
.github
api io/fs: move FileInfo, FileMode, PathError, ErrInvalid, ... from os to io/fs 2020-10-20 02:32:41 +00:00
doc cmd/go: set TOOLEXEC_IMPORTPATH for -toolexec tools 2020-10-22 15:10:01 +00:00
lib/time
misc misc/wasm: improve error message if javascript polyfills are required 2020-10-21 13:19:35 +00:00
src [dev.typeparams] cmd/compile/internal/types2: review of initorder.go 2020-10-27 23:30:32 +00:00
test [dev.typeparams] cmd/compile: enable type-checking of generic code 2020-10-27 03:37:05 +00:00
.gitattributes
.gitignore
AUTHORS A+C: add Kush Patel (corporate CLA for Hootsuite Inc) 2020-07-08 00:10:44 +00:00
CONTRIBUTING.md
CONTRIBUTORS
favicon.ico
LICENSE
PATENTS
README.md
robots.txt
SECURITY.md

The Go Programming Language

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Gopher image Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.

Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

Download and Install

Binary Distributions

Official binary distributions are available at https://golang.org/dl/.

After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.

Install From Source

If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.

Contributing

Go is the work of thousands of contributors. We appreciate your help!

To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html

Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.