]> Cypherpunks.ru repositories - gostls13.git/commit
go/types: add check that code is monomorphizable
authorMatthew Dempsky <mdempsky@google.com>
Wed, 20 Oct 2021 20:17:07 +0000 (13:17 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 2 Nov 2021 17:59:53 +0000 (17:59 +0000)
commit4ec52e363e93baa859cbdec23f997a489cfeca11
treef32d8a883d114d532b8a78fd95ed382d05b0a95b
parent7548327374844719bf90cce199e7fa4b43b94e2b
go/types: add check that code is monomorphizable

This CL adds a check to ensure that generic Go code doesn't involve
any unbounded recursive instantiation, which are incompatible with an
implementation that uses static instantiation (i.e., monomorphization
or compile-time dictionary construction).

Updates #48098.

Change-Id: I9d051f0f9369ab881592a361a5d0e2a716788a6b
Reviewed-on: https://go-review.googlesource.com/c/go/+/357449
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
src/go/types/call.go
src/go/types/check.go
src/go/types/errorcodes.go
src/go/types/mono.go [new file with mode: 0644]
src/go/types/mono_test.go [new file with mode: 0644]
src/go/types/signature.go
src/go/types/testdata/fixedbugs/issue48974.go2
src/go/types/typexpr.go