]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: set IsShape based on type being in the Shapes pkg
authorDan Scales <danscales@google.com>
Tue, 14 Sep 2021 15:39:08 +0000 (08:39 -0700)
committerDan Scales <danscales@google.com>
Tue, 14 Sep 2021 23:07:15 +0000 (23:07 +0000)
commit137543bb93e15286b54d58d17d51e609ed49339a
tree8ee82e36cdfef6019960c82f4eaac4d8437fc82b
parent3a72175cdcbfb64cca5968be52ac964f69d3a44a
cmd/compile: set IsShape based on type being in the Shapes pkg

Move ShapePkg to types, and change types.NewNamed to automatically set
IsShape/HasShape if a type is in the shapes pkg. This means that
imported shape types will automatically have the correct
IsShape/HasShape flags, even though we are not explicitly
exporting/importing those flags.

Updates #48337

Change-Id: I8b6131a663205f73f395943c9d0c8bdb2a213401
Reviewed-on: https://go-review.googlesource.com/c/go/+/349869
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/typecheck/subr.go
src/cmd/compile/internal/types/type.go
test/typeparam/issue48337b.dir/a.go [new file with mode: 0644]
test/typeparam/issue48337b.dir/main.go [new file with mode: 0644]
test/typeparam/issue48337b.go [new file with mode: 0644]