]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: pass type checker error codes in the compiler
authorRobert Griesemer <gri@golang.org>
Fri, 10 Mar 2023 00:21:22 +0000 (16:21 -0800)
committerGopher Robot <gobot@golang.org>
Fri, 10 Mar 2023 18:22:02 +0000 (18:22 +0000)
commit2cbab4e98c6091f5fb6cb73bdebfe328793da388
tree41fc9cf8552f5e9a932458314d7a279aa3f64847
parent3790ceca9735432486ba34da28f214349e4c1e7e
cmd/compile: pass type checker error codes in the compiler

Pass type checker error codes to base.ErrorfAt function calls
in the compiler (but don't do anything yet with the code).

Also, provide error codes to base.ErrorfAt calls in the
compiler as needed.

This opens the door towards reporting the error code and/or
providing a link/reference to more detailed explanations
(see internal/types/errors/codes.go).

Change-Id: I0ff9368d8163499ffdac6adfe8331fdc4a19b4b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/475198
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
20 files changed:
src/cmd/compile/internal/base/print.go
src/cmd/compile/internal/escape/escape.go
src/cmd/compile/internal/escape/graph.go
src/cmd/compile/internal/ir/func.go
src/cmd/compile/internal/noder/irgen.go
src/cmd/compile/internal/noder/noder.go
src/cmd/compile/internal/noder/writer.go
src/cmd/compile/internal/pkginit/initorder.go
src/cmd/compile/internal/ssagen/abi.go
src/cmd/compile/internal/ssagen/nowb.go
src/cmd/compile/internal/ssagen/pgen.go
src/cmd/compile/internal/staticdata/data.go
src/cmd/compile/internal/staticdata/embed.go
src/cmd/compile/internal/typecheck/const.go
src/cmd/compile/internal/typecheck/dcl.go
src/cmd/compile/internal/typecheck/stmt.go
src/cmd/compile/internal/typecheck/typecheck.go
src/cmd/compile/internal/types/size.go
src/cmd/compile/internal/types/type.go
src/cmd/compile/internal/walk/expr.go