diff options
author | Robert Griesemer <gri@golang.org> | 2021-03-25 12:31:25 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2021-03-29 16:48:08 +0000 |
commit | 2abf280a282a24486a819b0a916dd77c50b48d22 (patch) | |
tree | de71ba9aa068e5fc8f2240ed3733a4a39c1c8e18 /src/cmd/compile/internal/types2/expr.go | |
parent | 8f676144ad7b7c91adb0c6e1ec89aaa6283c6807 (diff) | |
download | go-2abf280a282a24486a819b0a916dd77c50b48d22.tar.gz go-2abf280a282a24486a819b0a916dd77c50b48d22.zip |
cmd/compile/internal/types2: remove 'strict' argument from several methods
The value is always 'false'. Brings the code closer in line with go/types.
Follow-up on https://golang.org/cl/304129.
Change-Id: I8bea550033f3187b44e9a54258e0cf642c11c369
Reviewed-on: https://go-review.googlesource.com/c/go/+/304849
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/expr.go')
-rw-r--r-- | src/cmd/compile/internal/types2/expr.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/types2/expr.go b/src/cmd/compile/internal/types2/expr.go index 2eb4ded465..b5ffdf34c2 100644 --- a/src/cmd/compile/internal/types2/expr.go +++ b/src/cmd/compile/internal/types2/expr.go @@ -1790,7 +1790,7 @@ func (check *Checker) exprInternal(x *operand, e syntax.Expr, hint Type) exprKin if T == Typ[Invalid] { goto Error } - check.typeAssertion(posFor(x), x, xtyp, T, false) + check.typeAssertion(posFor(x), x, xtyp, T) x.mode = commaok x.typ = T @@ -1916,8 +1916,8 @@ func keyVal(x constant.Value) interface{} { } // typeAssertion checks that x.(T) is legal; xtyp must be the type of x. -func (check *Checker) typeAssertion(pos syntax.Pos, x *operand, xtyp *Interface, T Type, strict bool) { - method, wrongType := check.assertableTo(xtyp, T, strict) +func (check *Checker) typeAssertion(pos syntax.Pos, x *operand, xtyp *Interface, T Type) { + method, wrongType := check.assertableTo(xtyp, T) if method == nil { return } |