1
0
mirror of https://github.com/golang/go synced 2024-11-26 22:01:27 -07:00
go/test/typeparam
Robert Griesemer 7c694fbad1 go/types, types2: delay receiver type validation
Delay validation of receiver type as it may cause premature expansion
of types the receiver type is dependent on. This was actually a TODO.

While the diff looks large-ish, the actual change is small: all the
receiver validation code has been moved inside the delayed function
body, and a couple of comments have been adjusted.

Fixes #51232.
Fixes #51233.

Change-Id: I44edf0ba615996266791724b832d81b9ccb8b435
Reviewed-on: https://go-review.googlesource.com/c/go/+/387918
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-02-25 15:55:34 +00:00
..
absdiffimp2.dir go/types, types2: disallow real, imag, complex on type parameters 2022-02-01 01:07:25 +00:00
absdiffimp.dir cmd/compile/internal/types2: disallow lone type parameter on RHS of type declaration 2021-10-28 00:11:24 +00:00
aliasimp.dir
chansimp.dir
dedup.dir
factimp.dir
gencrawler.dir cmd/compile, test: updated comments in crawler.go, added test 2022-01-10 19:51:05 +00:00
geninline.dir
issue46461b.dir cmd/compile/internal/types2: disallow type cycles through type parameter lists 2021-11-10 00:56:09 +00:00
issue47514c.dir
issue47775.dir
issue47892.dir
issue47892b.dir
issue48094.dir
issue48094b.dir
issue48185a.dir
issue48185b.dir
issue48280.dir cmd/compile/internal/types2: disallow type cycles through type parameter lists 2021-11-10 00:56:09 +00:00
issue48306.dir cmd/compile/internal/types2: disallow type cycles through type parameter lists 2021-11-10 00:56:09 +00:00
issue48337a.dir
issue48337b.dir
issue48454.dir
issue48462.dir
issue48716.dir
issue48962.dir go/types, types2: consider type parameters for cycle detection 2022-01-24 21:27:28 +00:00
issue49027.dir
issue49241.dir cmd/compile: mark type descriptors as always dupok 2021-11-02 18:31:53 +00:00
issue49246.dir cmd/compile: fix panic when refer to method of imported instantiated type 2021-11-02 03:09:01 +00:00
issue49497.dir cmd/compile: don't do Resolve on OKEY identifiers during import 2021-11-10 21:53:03 +00:00
issue49524.dir cmd/compile: ensure stenciled function bodies are nonempty 2021-11-11 20:34:56 +00:00
issue49659.dir cmd/compile: don't run ComputeAddrTaken on imported generic functions 2021-11-19 00:05:59 +00:00
issue49667.dir cmd/compile: ensure generic function is loaded when it needs to be re-exported 2021-11-20 01:00:16 +00:00
issue49893.dir cmd/compile: fix case where g.curDecl should be saved/restored 2021-12-02 07:04:05 +00:00
issue50121.dir constraints: remove package 2022-02-03 03:13:33 +00:00
issue50121b.dir constraints: remove package 2022-02-03 03:13:33 +00:00
issue50437.dir cmd/compile: fix instantiation of types referenced during inlining 2022-01-07 17:55:52 +00:00
issue50481b.dir cmd/compile: make sure multiple blank typeparams remain unique 2022-01-21 00:39:55 +00:00
issue50481c.dir cmd/compile: make sure multiple blank typeparams remain unique 2022-01-21 00:39:55 +00:00
issue50485.dir cmd/compile: fix the names of methods created during type substitution 2022-01-11 22:50:23 +00:00
issue50486.dir cmd/compile: in typ0(), load base type before checking s.Def 2022-01-11 21:56:11 +00:00
issue50552.dir cmd/compile: resolve dictionaries/shape methods in markInlBody, if needed 2022-01-11 21:51:51 +00:00
issue50561.dir cmd/compile: descend through types to find fully-instantiated types 2022-01-13 22:58:24 +00:00
issue50598.dir cmd/compile: add call to ImportedBody() when exporting shape inst body 2022-01-14 16:41:18 +00:00
issue50841.dir cmd/compile: add missing shape check in (*Tsubster).tinter 2022-01-27 05:30:27 +00:00
issue51219.dir cmd/compile: fix importers to deal with recursion through type constraints 2022-02-18 16:56:42 +00:00
listimp2.dir
listimp.dir
mapimp.dir
mapsimp.dir
mdempsky cmd/compile/internal/types2: use "implements" rather than "satisfies" in error messages 2021-11-15 21:22:19 +00:00
mincheck.dir cmd/compile/internal/types2: use "implements" rather than "satisfies" in error messages 2021-11-15 21:22:19 +00:00
minimp.dir
mutualimp.dir
orderedmapsimp.dir
pairimp.dir
recoverimp.dir
select.dir test: add test of select inside generic function 2021-12-03 22:57:02 +00:00
setsimp.dir
sliceimp.dir
stringerimp.dir
structinit.dir cmd/compile: don't re-typecheck while importing 2021-12-16 00:34:10 +00:00
valimp.dir
absdiff2.go go/types, types2: disallow real, imag, complex on type parameters 2022-02-01 01:07:25 +00:00
absdiff3.go go/types, types2: disallow real, imag, complex on type parameters 2022-02-01 01:07:25 +00:00
absdiff.go cmd/compile/internal/types2: disallow lone type parameter on RHS of type declaration 2021-10-28 00:11:24 +00:00
absdiffimp2.go cmd/compile: new absdiff.go test, fix problem with g.curDecl 2022-01-25 00:39:08 +00:00
absdiffimp.go
adder.go
aliasimp.go
append.go
boundmethod.go cmd/compile/internal/types2: disallow lone type parameter on RHS of type declaration 2021-10-28 00:11:24 +00:00
builtins.go cmd/compile: error when using internal type declarations in generic functions 2021-11-15 21:21:51 +00:00
chans.go
chansimp.go
combine.go
cons.go
dedup.go
dedup.out
dictionaryCapture-noinline.go
dictionaryCapture.go
dottype.go
dottype.out
double.go
eface.go
equal.go
fact.go
factimp.go
gencrawler.go cmd/compile, test: updated comments in crawler.go, added test 2022-01-10 19:51:05 +00:00
gencrawler.out cmd/compile, test: updated comments in crawler.go, added test 2022-01-10 19:51:05 +00:00
genembed2.go
genembed.go
geninline.go
graph.go
ifaceconv.go
importtest.go
index2.go test/typeparam: add test for indexing on typeparams with various constraints 2021-11-03 15:47:47 +00:00
index.go
interfacearg.go
issue23536.go cmd/compile: fix conv of slice of user-define byte type to string 2022-01-07 18:40:16 +00:00
issue39755.go
issue44688.go
issue45547.go
issue45722.go
issue45738.go
issue45817.go
issue46461.go cmd/compile/internal/types2: disallow type cycles through type parameter lists 2021-11-10 00:56:09 +00:00
issue46461b.go
issue46472.go
issue46591.go
issue47258.go
issue47272.go
issue47272.out
issue47514.go
issue47514b.go
issue47514c.go
issue47631.go cmd/compile: error when using internal type declarations in generic functions 2021-11-15 21:21:51 +00:00
issue47676.go
issue47684.go
issue47684b.go
issue47684c.go
issue47708.go cmd/compile/internal/types2: disallow lone type parameter on RHS of type declaration 2021-10-28 00:11:24 +00:00
issue47710.go
issue47713.go
issue47713.out
issue47716.go
issue47723.go
issue47740.go cmd/compile/internal/types2: disallow lone type parameter on RHS of type declaration 2021-10-28 00:11:24 +00:00
issue47740.out cmd/compile/internal/types2: disallow lone type parameter on RHS of type declaration 2021-10-28 00:11:24 +00:00
issue47740b.go
issue47775.go
issue47775b.go
issue47797.go
issue47877.go
issue47878.go
issue47892.go
issue47892b.go
issue47896.go
issue47901.go
issue47924.go
issue47925.go
issue47925b.go
issue47925c.go
issue47925d.go
issue47929.go
issue47948.go
issue47966.go
issue48013.go
issue48016.go
issue48030.go
issue48042.go
issue48047.go
issue48049.go
issue48056.go
issue48094.go
issue48094b.go
issue48137.go
issue48185a.go
issue48185b.go
issue48191.go
issue48198.go
issue48225.go
issue48253.go
issue48276a.go go/types, types2: fix implements and identical predicates 2022-01-31 20:35:07 +00:00
issue48276a.out go/types, types2: fix implements and identical predicates 2022-01-31 20:35:07 +00:00
issue48276b.go
issue48280.go
issue48306.go
issue48317.go
issue48318.go
issue48337a.go
issue48337a.out
issue48337b.go
issue48344.go
issue48424.go
issue48453.go
issue48454.go
issue48462.go
issue48537.go
issue48538.go cmd/compile: use Structure() to get single underlying type of typeparam. 2021-10-29 23:25:18 +00:00
issue48598.go
issue48602.go
issue48604.go
issue48609.go
issue48617.go
issue48645a.go
issue48645a.out
issue48645b.go
issue48711.go test: add regress test for reported non-monomorphizable example 2021-11-08 21:52:47 +00:00
issue48716.go
issue48838.go
issue48962.go go/types, types2: consider type parameters for cycle detection 2022-01-24 21:27:28 +00:00
issue49027.go
issue49049.go
issue49241.go cmd/compile: mark type descriptors as always dupok 2021-11-02 18:31:53 +00:00
issue49246.go cmd/compile: fix panic when refer to method of imported instantiated type 2021-11-02 03:09:01 +00:00
issue49295.go cmd/compile: make pointers to arrays their own shape 2021-11-03 17:56:16 +00:00
issue49309.go cmd/compile: don't inline fn with no shape params, but passed a shape arg 2021-11-04 15:43:59 +00:00
issue49421.go cmd/compile: remove unneeded "==" method in pre-defined "comparable" interface 2021-11-09 00:08:42 +00:00
issue49432.go cmd/compile: fix irgen mis-handling of ... argument when creating closure 2021-11-09 00:08:09 +00:00
issue49497.go cmd/compile: don't do Resolve on OKEY identifiers during import 2021-11-10 21:53:03 +00:00
issue49516.go cmd/compile: fix missing ddd when building call for function instantiation closure 2021-11-11 17:18:13 +00:00
issue49524.go cmd/compile: ensure stenciled function bodies are nonempty 2021-11-11 20:34:56 +00:00
issue49538.go cmd/compile: fix missing transformEarlyCall for OXDOT in subster.node 2021-11-12 18:57:22 +00:00
issue49547.go cmd/compile: ensure we replace package placeholder in type names 2021-11-14 17:38:42 +00:00
issue49611.go cmd/compile: prevent irgen crashing for empty local declaration stmt 2021-11-16 15:38:59 +00:00
issue49659.go cmd/compile: don't run ComputeAddrTaken on imported generic functions 2021-11-19 00:05:59 +00:00
issue49659b.go cmd/compile: don't run ComputeAddrTaken on imported generic functions 2021-11-19 00:05:59 +00:00
issue49667.go cmd/compile: ensure generic function is loaded when it needs to be re-exported 2021-11-20 01:00:16 +00:00
issue49875.go cmd/compile: fix identical to recognize any and interface{} 2021-12-01 10:19:34 +00:00
issue49893.go cmd/compile: fix case where g.curDecl should be saved/restored 2021-12-02 07:04:05 +00:00
issue50002.go cmd/compile: deal with unsatisfiable type assertion in some instantiations 2021-12-07 21:54:30 +00:00
issue50109.go cmd/compile: fix identity case relating to 'any' and shape types 2021-12-13 06:35:06 +00:00
issue50109.out cmd/compile: fix identity case relating to 'any' and shape types 2021-12-13 06:35:06 +00:00
issue50109b.go test: add simpler test for issue 50109 2021-12-15 23:51:57 +00:00
issue50121.go cmd/compile: avoid re-instantiating method that is already imported 2021-12-13 22:45:26 +00:00
issue50121b.go cmd/compile: fix interaction between generics and inlining 2022-01-10 17:02:46 +00:00
issue50147.go cmd/compile: fix case where we didn't delay transformAssign in varDecl 2021-12-14 01:18:43 +00:00
issue50177.go cmd/compile: pop instantiations of local types when leaving scope 2022-01-04 22:05:15 +00:00
issue50193.go constraints: remove package 2022-02-03 03:13:33 +00:00
issue50193.out cmd/compile: upgrade ssa to do (int or float) -> complex 2021-12-16 00:33:58 +00:00
issue50259.go go/types, types2: reorder object processing to avoid broken aliases 2022-01-24 21:27:33 +00:00
issue50264.go cmd/compile: save selector/inst info for generic method/function calls 2022-01-04 22:27:20 +00:00
issue50317.go test/typeparam: adjust test preamble (fix longtests) 2022-01-07 02:32:03 +00:00
issue50417.go go/types, types2: rename structuralType/String to coreType/String 2022-02-09 22:58:35 +00:00
issue50417b.go cmd/compile: support field access for typeparam with structural constraint 2022-01-18 18:16:14 +00:00
issue50419.go cmd/compile: make sure multiple blank typeparams remain unique 2022-01-21 00:39:55 +00:00
issue50437.go cmd/compile: fix instantiation of types referenced during inlining 2022-01-07 17:55:52 +00:00
issue50481b.go cmd/compile: make sure multiple blank typeparams remain unique 2022-01-21 00:39:55 +00:00
issue50481c.go cmd/compile: make sure multiple blank typeparams remain unique 2022-01-21 00:39:55 +00:00
issue50481c.out cmd/compile: make sure multiple blank typeparams remain unique 2022-01-21 00:39:55 +00:00
issue50485.go cmd/compile: fix the names of methods created during type substitution 2022-01-11 22:50:23 +00:00
issue50486.go cmd/compile: in typ0(), load base type before checking s.Def 2022-01-11 21:56:11 +00:00
issue50552.go cmd/compile: resolve dictionaries/shape methods in markInlBody, if needed 2022-01-11 21:51:51 +00:00
issue50561.go cmd/compile: descend through types to find fully-instantiated types 2022-01-13 22:58:24 +00:00
issue50598.go cmd/compile: add call to ImportedBody() when exporting shape inst body 2022-01-14 16:41:18 +00:00
issue50642.go cmd/compile: add early a CONVIFACE normally created in the order phase 2022-01-19 21:14:18 +00:00
issue50690a.go cmd/compile: distinguish bound calls/field access in getInstInfo 2022-01-24 17:07:30 +00:00
issue50690a.out cmd/compile: distinguish bound calls/field access in getInstInfo 2022-01-24 17:07:30 +00:00
issue50690b.go cmd/compile: distinguish bound calls/field access in getInstInfo 2022-01-24 17:07:30 +00:00
issue50690b.out cmd/compile: distinguish bound calls/field access in getInstInfo 2022-01-24 17:07:30 +00:00
issue50690c.go cmd/compile: distinguish bound calls/field access in getInstInfo 2022-01-24 17:07:30 +00:00
issue50690c.out cmd/compile: distinguish bound calls/field access in getInstInfo 2022-01-24 17:07:30 +00:00
issue50833.go go/types, cmd/compile: fix composite literal structural typing 2022-01-27 19:55:38 +00:00
issue50841.go cmd/compile: add missing shape check in (*Tsubster).tinter 2022-01-27 05:30:27 +00:00
issue50993.go cmd/compile: restrict generics test to -G=3 2022-02-03 23:55:05 +00:00
issue51219.go cmd/compile: fix importers to deal with recursion through type constraints 2022-02-18 16:56:42 +00:00
issue51219.out cmd/compile: fix importers to deal with recursion through type constraints 2022-02-18 16:56:42 +00:00
issue51232.go go/types, types2: delay receiver type validation 2022-02-25 15:55:34 +00:00
issue51233.go go/types, types2: delay receiver type validation 2022-02-25 15:55:34 +00:00
issue51236.go cmd/compile: delay all call transforms if in a generic function 2022-02-24 17:35:40 +00:00
issue376214.go cmd/compile: accept string|[]byte-constrained 2nd argument in append 2022-01-07 22:40:23 +00:00
list2.go
list.go
listimp2.go
listimp.go
lockable.go
map.go
mapimp.go
maps.go
mapsimp.go
metrics.go
min.go
mincheck.go
minimp.go
mutualimp.go
nested.go
nested.out cmd/compile: ensure we replace package placeholder in type names 2021-11-14 17:38:42 +00:00
ordered.go
orderedmap.go
orderedmapsimp.go
pair.go
pairimp.go
pragma.go
recoverimp.go
recoverimp.out
select.go test: add test of select inside generic function 2021-12-03 22:57:02 +00:00
sets.go
setsimp.go
settable.go
shape1.go
shape1.out
sliceimp.go
slices.go
smallest.go
smoketest.go
stringable.go
stringer.go
stringerimp.go
struct.go
structinit.go cmd/compile: don't re-typecheck while importing 2021-12-16 00:34:10 +00:00
subdict.go
sum.go
tparam1.go
typelist.go go/types, types2: rename structuralType/String to coreType/String 2022-02-09 22:58:35 +00:00
typeswitch1.go test: add extra typeswitch tests that cause duplicate cases 2021-12-08 17:55:13 +00:00
typeswitch1.out test: add extra typeswitch tests that cause duplicate cases 2021-12-08 17:55:13 +00:00
typeswitch2.go test: add extra typeswitch tests that cause duplicate cases 2021-12-08 17:55:13 +00:00
typeswitch2.out test: add extra typeswitch tests that cause duplicate cases 2021-12-08 17:55:13 +00:00
typeswitch3.go test: add extra typeswitch tests that cause duplicate cases 2021-12-08 17:55:13 +00:00
typeswitch3.out test: add extra typeswitch tests that cause duplicate cases 2021-12-08 17:55:13 +00:00
typeswitch4.go test: add extra typeswitch tests that cause duplicate cases 2021-12-08 17:55:13 +00:00
typeswitch4.out test: add extra typeswitch tests that cause duplicate cases 2021-12-08 17:55:13 +00:00
typeswitch5.go
typeswitch5.out
typeswitch6.go
typeswitch6.out
typeswitch7.go
typeswitch7.out
valimp.go
value.go