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

Comments

Projects
None yet
4 participants
@griesemer
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

This comment has been minimized.

Member

bradfitz commented Dec 21, 2017

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

@andybons

This comment has been minimized.

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

This comment has been minimized.

Member

bradfitz commented Dec 21, 2017

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

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Dec 21, 2017

(Seems to work with gccgo.)

@andybons

This comment has been minimized.

Member

andybons commented Dec 21, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment