diff options
author | Robert Griesemer <gri@golang.org> | 2020-11-30 21:38:49 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2020-12-01 21:49:31 +0000 |
commit | 72ad2f44eaf8bb71ea100fd4acf7dd04384c7175 (patch) | |
tree | 40bb3522f5dcd398280bea526b44921f7b9e572d /test/const2.go | |
parent | 87bc85a846d5dc2d8fe7dbda900d6066ab98f1a5 (diff) | |
download | go-72ad2f44eaf8bb71ea100fd4acf7dd04384c7175.tar.gz go-72ad2f44eaf8bb71ea100fd4acf7dd04384c7175.zip |
[dev.typeparams] test: add scaffolding to run.go to check compiler with -G flag
Added a new flag -G to run. Setting -G (as in: go run run.go -G)
will run tests marked with "errorcheck" (and no other flags) also
with the compiler using the new typechecker.
Many tests don't pass yet (due to discrepancies in error messages).
The top-level tests in the test directory which don't pass yet have
been explicitly excluded, permitting to see the current status.
Future CLs will bring error messages in sync and eventually all
tests should pass.
Change-Id: I7caf5eff413e173f68d092af4bbe458434718d74
Reviewed-on: https://go-review.googlesource.com/c/go/+/274313
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'test/const2.go')
-rw-r--r-- | test/const2.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/const2.go b/test/const2.go index d104a2fa71..f0de37be15 100644 --- a/test/const2.go +++ b/test/const2.go @@ -11,7 +11,7 @@ package main const ( A int = 1 - B byte; // ERROR "type without expr|expected .=." + B byte; // ERROR "type without expr|expected .=.|missing init expr" ) const LargeA = 1000000000000000000 @@ -23,7 +23,7 @@ const AlsoLargeA = LargeA << 400 << 400 >> 400 >> 400 // GC_ERROR "constant shif // Issue #42732. const a = 1e+500000000 -const b = a * a // ERROR "constant multiplication overflow" +const b = a * a // ERROR "constant multiplication overflow|not representable" const c = b * b const MaxInt512 = (1<<256 - 1) * (1<<256 + 1) |