diff options
author | Robert Griesemer <gri@golang.org> | 2023-03-28 11:18:40 -0700 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-03-29 20:53:12 +0000 |
commit | f46ea60f2b072885439d5b3b2f751b16d2b1f18e (patch) | |
tree | 7171098f439a541b75a2263f45c0ca19bc3bfed1 /src/go/types | |
parent | cc048b32f3de4168de6b0207fd01c65e51d37ac0 (diff) | |
download | go-git-f46ea60f2b072885439d5b3b2f751b16d2b1f18e.tar.gz |
go/types, types2: slightly tighter checks in Checker.use
Checker.use is called to check expressions and "use" variables
in case of an error. Use Checker.exprOrType instead of just
rawExpr.
Change-Id: I4da6fa51ef3b0c9b07c453494452836caced9b1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/479897
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Diffstat (limited to 'src/go/types')
-rw-r--r-- | src/go/types/call.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/go/types/call.go b/src/go/types/call.go index f75043d5dc..bdcfd9d56b 100644 --- a/src/go/types/call.go +++ b/src/go/types/call.go @@ -870,7 +870,7 @@ func (check *Checker) use1(e ast.Expr, lhs bool) bool { } } } - check.rawExpr(nil, &x, n, nil, true) + check.exprOrType(&x, n, true) if v != nil { v.used = v_used // restore v.used } |