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/alias2.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/alias2.go')
-rw-r--r-- | test/alias2.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/alias2.go b/test/alias2.go index 1c141ac490..d7b5dccb68 100644 --- a/test/alias2.go +++ b/test/alias2.go @@ -36,7 +36,7 @@ type ( // Methods can be declared on the original named type and the alias. func (T0) m1() {} // GCCGO_ERROR "previous" -func (*T0) m1() {} // ERROR "method redeclared: T0\.m1|redefinition of .m1." +func (*T0) m1() {} // ERROR "method redeclared: T0\.m1|T0\.m1 redeclared in this block|redefinition of .m1." func (A0) m1() {} // ERROR "T0\.m1 redeclared in this block|redefinition of .m1." func (A0) m1() {} // ERROR "T0\.m1 redeclared in this block|redefinition of .m1." func (A0) m2() {} @@ -90,7 +90,7 @@ func _() { // Invalid type alias declarations. -type _ = reflect.ValueOf // ERROR "reflect.ValueOf is not a type|expected type" +type _ = reflect.ValueOf // ERROR "reflect.ValueOf .*is not a type|expected type" func (A1) m() {} // ERROR "cannot define new methods on non-local type int|may not define methods on non-local type" func (A2) m() {} // ERROR "invalid receiver type" |