diff options
author | Robert Griesemer <gri@golang.org> | 2020-12-04 13:20:06 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2020-12-07 16:44:07 +0000 |
commit | cd15a48036b7c0e8369b18d6def93a950c35ff0a (patch) | |
tree | bc4932e428195955882bc2b752e1a051b74233a5 /src/cmd/compile/internal/types2/check.go | |
parent | 02820d61a9d0027140e6da567323e0822d513358 (diff) | |
download | go-cd15a48036b7c0e8369b18d6def93a950c35ff0a.tar.gz go-cd15a48036b7c0e8369b18d6def93a950c35ff0a.zip |
[dev.typeparams] cmd/compile/internal/types2: correct error position for inherited const init expression
Enabled fixedbugs/issue8183.go for run.go with new typechecker
now that issue is fixed.
Fixes #42992.
Updates #42991.
Change-Id: I23451999983b740d5f37ce3fa75ee756daf1a44f
Reviewed-on: https://go-review.googlesource.com/c/go/+/275517
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/check.go')
-rw-r--r-- | src/cmd/compile/internal/types2/check.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/types2/check.go b/src/cmd/compile/internal/types2/check.go index 4504586545..6ba8506916 100644 --- a/src/cmd/compile/internal/types2/check.go +++ b/src/cmd/compile/internal/types2/check.go @@ -51,6 +51,7 @@ type context struct { scope *Scope // top-most scope for lookups pos syntax.Pos // if valid, identifiers are looked up as if at position pos (used by Eval) iota constant.Value // value of iota in a constant declaration; nil otherwise + errpos syntax.Pos // if valid, identifier position of a constant with inherited initializer sig *Signature // function signature if inside a function; nil otherwise isPanic map[*syntax.CallExpr]bool // set of panic call expressions (used for termination check) hasLabel bool // set if a function makes use of labels (only ~1% of functions); unused outside functions |