]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: error when using internal type declarations in generic functions
authorKeith Randall <khr@golang.org>
Mon, 15 Nov 2021 18:01:43 +0000 (10:01 -0800)
committerKeith Randall <khr@golang.org>
Mon, 15 Nov 2021 21:21:51 +0000 (21:21 +0000)
commit560dc9712d4bc900b5ab32b518ba4de2a9bc588c
tree214681686e2ef4f140ce47ded79889389b81afae
parent92655582d0d3b739a1fc88c73cc49a24eb57f845
cmd/compile: error when using internal type declarations in generic functions

We hope to support this feature one day, but it doesn't work currently.
Issue a nice error message instead of having the compiler crash.

Update #47631

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