From e09dcc211a338450d3f680fe39abc13b79ddbb29 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 16 Sep 2021 15:09:31 -0700 Subject: [PATCH] go/types, types2: add an additional shift test case The extra test just confirms that the type-checker internally agrees with the spec with the (otherwise invisible) type given to an untyped constant in a specific shift expression. For #48422. Change-Id: I6d98045f90bd20b0cc0a96a147bec9701039cb07 Reviewed-on: https://go-review.googlesource.com/c/go/+/350410 Trust: Robert Griesemer Run-TryBot: Robert Griesemer Reviewed-by: Matthew Dempsky --- src/cmd/compile/internal/types2/api_test.go | 1 + src/go/types/api_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/src/cmd/compile/internal/types2/api_test.go b/src/cmd/compile/internal/types2/api_test.go index 5a20738631..cd5a61332a 100644 --- a/src/cmd/compile/internal/types2/api_test.go +++ b/src/cmd/compile/internal/types2/api_test.go @@ -145,6 +145,7 @@ func TestValuesInfo(t *testing.T) { {`package f7b; var _ = -1e-2000i`, `-1e-2000i`, `complex128`, `(0 + 0i)`}, {`package g0; const (a = len([iota]int{}); b; c); const _ = c`, `c`, `int`, `2`}, // issue #22341 + {`package g1; var(j int32; s int; n = 1.0<