aboutsummaryrefslogtreecommitdiff
path: root/test/typeparam/smoketest.go
AgeCommit message (Collapse)Author
2021-08-21cmd/compile: enable -G=3 by defaultMatthew Dempsky
This CL changes cmd/compile's -G flag's default from 0 to 3, which enables use of the new types2 type checker and support for type parameters. The old type checker is still available with -gcflags=all=-G=0. The CL also updates the regress test harness to account for the change in default behavior (e.g., to expect known types2 changes/failures). However, the -G=0 mode is still being tested for now. Copy of CL 340914 by danscales@, minus the cmd/internal/objabi.AbsFile change (handled instead by CL 343731) and rebased to master branch. Updates #43651. Change-Id: I1f62d6c0a3ff245e15c5c0e8f3d922129fdd4f29 Reviewed-on: https://go-review.googlesource.com/c/go/+/343732 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
2021-08-10[dev.typeparams] cmd/compile/internal/types2: parameterized functions must ↵Robert Griesemer
have a body Add the respective check and add missing bodies to tests. Use {} as body for functions that don't return a result. Use { panic(0) } as body for functions that return a result. For #47069. Change-Id: Ia5d7525c9c036baf8a955d13bff448401e08235e Reviewed-on: https://go-review.googlesource.com/c/go/+/340911 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
2021-07-28[dev.typeparams] test/typeparam: gofmt -wMatthew Dempsky
We don't usually reformat the test directory, but all of the files in test/typeparam are syntactically valid. I suspect the misformattings here are because developers aren't re-installing gofmt with -tags=typeparams, not intentionally exercising non-standard formatting. Change-Id: I3767d480434c19225568f3c7d656dc8589197183 Reviewed-on: https://go-review.googlesource.com/c/go/+/338093 Trust: Matthew Dempsky <mdempsky@google.com> Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
2021-06-03[dev.typeparams] test: update all the typeparam tests to use the new ↵Dan Scales
union/tilde syntax Did a mix of tilde and non-tilde usage. Tilde notation is not quite fully functional, so no tests are currently trying to distinguish (fail/not fail) based on tilde usage. Change-Id: Ib50cec2fc0684f9d9f3561c889fd44c7a7af458c Reviewed-on: https://go-review.googlesource.com/c/go/+/324572 Trust: Dan Scales <danscales@google.com> Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
2020-10-27[dev.typeparams] cmd/compile: enable type-checking of generic codeRobert Griesemer
This change makes a first connection between the compiler and types2. When the -G flag is provided, the compiler accepts code using type parameters; with this change generic code is also type-checked (but then compilation ends). Change-Id: I0fa6f6213267a458a6b33afe8ff26869fd838a63 Reviewed-on: https://go-review.googlesource.com/c/go/+/264303 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>
2020-10-13[dev.typeparams] cmd/compile: enable parsing of generic code with new -G flagRobert Griesemer
Providing the -G flag instructs the compiler to accept type parameters. For now, the compiler only parses such files and then exits. Added a new test directory (test/typeparam) and initial test case. Port from dev.go2go branch. Change-Id: Ic11e33a9d5f012f8def0bdae205043659562ac73 Reviewed-on: https://go-review.googlesource.com/c/go/+/261660 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>