]> Cypherpunks repositories - gostls13.git/commit
go/internal/gccgoimporter: support embedded field in pointer loop
authorIan Lance Taylor <iant@golang.org>
Tue, 10 Sep 2019 02:22:46 +0000 (19:22 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 10 Sep 2019 17:21:14 +0000 (17:21 +0000)
commit0a3b65c4926479c6ea2b8439cf073a43bfc2b9b6
treeff40af3e8979f6a55b787110a3d1e24788f0e14d
parent23bf6af99650c1302bc2120536f128c848b2d28c
go/internal/gccgoimporter: support embedded field in pointer loop

If an embedded field refers to a type via a pointer, the parser needs
to know the name of the embedded field. It is possible that the
pointer type is not yet resolved. This CL fixes the parser to handle
that case by setting the pointer element type to the unresolved named
type while the pointer is being resolved.

Fixes #34182

Change-Id: I48435e0404362a85effd7463685c502290fa3c57
Reviewed-on: https://go-review.googlesource.com/c/go/+/194440
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/go/internal/gccgoimporter/importer_test.go
src/go/internal/gccgoimporter/parser.go
src/go/internal/gccgoimporter/testdata/issue34182.go [new file with mode: 0644]
src/go/internal/gccgoimporter/testdata/issue34182.gox [new file with mode: 0644]