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
Milestone

Comments

@go101
Copy link

@go101 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 dsnet commented Dec 18, 2019

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

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Dec 20, 2019

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.