Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gccgo: aliases of *T should be embeddable if T is a defined type which is neither pointer nor interface #36153

Open
go101 opened this issue Dec 15, 2019 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@go101
Copy link

go101 commented Dec 15, 2019

I create this issue per @ianlancetaylor's suggestion.

What version of Go are you using (go version)?

$ gccgo --version
gccgo (Debian 8.3.0-6) 8.3.0

Does this issue reproduce with the latest release?

yes.

What did you do?

package main

type P1 = *bool
type P2 = *struct{}

type T struct {
	P1
	P2
}

func main() {}

What did you expect to see?

Compiles okay.

What did you see instead?

Doesn't compile.

@gopherbot gopherbot added this to the Gccgo milestone Dec 15, 2019
@dsnet
Copy link
Member

dsnet commented Dec 18, 2019

\cc @cherrymui This sounds awfully similar to the other type alias bug I encountered recently.

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 20, 2019
@dmitshur
Copy link
Contributor

Also /cc @ianlancetaylor from the originating issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants