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

cmd/compile: validity of program depends on method declaration order #23202

Open
griesemer opened this issue Dec 21, 2017 · 5 comments
Open

cmd/compile: validity of program depends on method declaration order #23202

griesemer opened this issue Dec 21, 2017 · 5 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@griesemer
Copy link
Contributor

griesemer commented Dec 21, 2017

https://play.golang.org/p/WCktUidLyc_3 is accepted while the equivalent program https://play.golang.org/p/Z-B9rBhYILd fails with an error. The only difference is the order of the method declarations.

Esoteric case; recording this so we're aware of it.

@bradfitz
Copy link
Contributor

Hey @andybons, that first snippet doesn't load.

@andybons
Copy link
Member

andybons commented Dec 21, 2017

Yes it does. The trailing underscore gets stripped with some URL parsers (like in Gmail or GitHub). Make sure it’s there and it should load.

@bradfitz
Copy link
Contributor

Maybe we shouldn't generate snippets with trailing underscores then.

@ianlancetaylor
Copy link
Contributor

(Seems to work with gccgo.)

@andybons
Copy link
Member

Pushed new version of play and updated original comment with link that is properly linkified by GitHub. Sorry to derail this bug, Robert.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
Status: Triage Backlog
Development

No branches or pull requests

5 participants