]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: resolve dictionaries/shape methods in markInlBody, if needed
authorDan Scales <danscales@google.com>
Tue, 11 Jan 2022 17:14:38 +0000 (09:14 -0800)
committerDan Scales <danscales@google.com>
Tue, 11 Jan 2022 21:51:51 +0000 (21:51 +0000)
commitad7eae21d5e75a0b1fe89db5f299490d6273c4cf
treeba67e0511a9092b6c532ad9fce91ec6521125d70
parenta20724d63425ccb871c57d45e2401af2401518bc
cmd/compile: resolve dictionaries/shape methods in markInlBody, if needed

Issue #50552 is due to a problem with my recent improvement in the
interaction between generics and inlining. In markInlBody(), we now mark
dictionaries and shape methods for export, so they will be available for
any package that inlines the current inlineable function. But we need to
make sure that the dictionary and method symbols have actually been
resolved into Nodes (looked up in the import data), if they are not
already defined, so we can then mark them for export.

Improved header comment on Resolve().

Fixes #50552

Change-Id: I89e52d39d3b9894591d2ad6eb3a8ed3bb5f1e0a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/377714
Reviewed-by: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
src/cmd/compile/internal/typecheck/crawler.go
src/cmd/compile/internal/typecheck/typecheck.go
test/run.go
test/typeparam/issue50552.dir/a.go [new file with mode: 0644]
test/typeparam/issue50552.dir/main.go [new file with mode: 0644]
test/typeparam/issue50552.go [new file with mode: 0644]