]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: added a builtins.go test, fixed one bug
authorDan Scales <danscales@google.com>
Tue, 20 Jul 2021 16:37:35 +0000 (09:37 -0700)
committerDan Scales <danscales@google.com>
Wed, 21 Jul 2021 21:25:20 +0000 (21:25 +0000)
commitf19e49e7b185472b8ff919285e740cc198596497
tree94c4563c84d447b41f050d77107a93278a71d7d8
parente6a2cf233f736e6852b64b53d66dbda21c2e062d
[dev.typeparams] cmd/compile: added a builtins.go test, fixed one bug

The builtins.go test is derived from
cmd/compile/internal/types2/testdata/check/builtins.go2, after removing
the error cases.  Added a few extra tests for len/cap/append.

Fixed one bug, which is that DELETE operations can't be transformed if
their argument is a typeparam. Also, the tranform of LEN/CAP calls does
not need to be delayed. Removed out-date references to the old
typechecker in the comments.

Change-Id: If7a21506a7ff63ff7c8e87ccd614ef4ff3a0d3c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/336010
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
src/cmd/compile/internal/noder/helpers.go
src/cmd/compile/internal/noder/stencil.go
test/typeparam/builtins.go [new file with mode: 0644]