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: unexported interface method declared in body of exported inlined function causes import error #14164
Labels
Milestone
Comments
Haven't investigated yet but if real it's related to the new parser. Will look into this later this weekend. |
Definitively an error with the rewritten parser. Given a 3rd file, main.go:
The error is due to a bug in the parser:
parser.interfacedcl needs to accept also '@', not just LNAME. Will fix. |
bradfitz
changed the title
Using lower case interface method name causes error message at import: "syntax error: unexpected @"
cmd/compile: using lower case interface method name causes error message at import: "syntax error: unexpected @"
Jan 31, 2016
griesemer
changed the title
cmd/compile: using lower case interface method name causes error message at import: "syntax error: unexpected @"
cmd/compile: unexported interface method in declared in body of exported inlined function causes error message at import: "syntax error: unexpected @"
Feb 1, 2016
griesemer
changed the title
cmd/compile: unexported interface method in declared in body of exported inlined function causes error message at import: "syntax error: unexpected @"
cmd/compile: unexported interface method declared in body of exported inlined function causes error message at import: "syntax error: unexpected @"
Feb 1, 2016
griesemer
changed the title
cmd/compile: unexported interface method declared in body of exported inlined function causes error message at import: "syntax error: unexpected @"
cmd/compile: unexported interface method declared in body of exported inlined function causes import error
Feb 1, 2016
CL https://golang.org/cl/19087 mentions this issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version:
go1.6rc1/darwin
Note that
go1.5.x
does not have this issue. Maybe this is a new feature by design that I don't know, but the error message does not tell the point of problem.Let's have a package with the following contents,
Then test it,
Note that the problem is not about testing. If this package is used by a program, it reports the problem at the line of
import
.In the function
IsInternalErr()
, change this line,to the following with capitalized interface method name
Internal
,the problem is gone.
The text was updated successfully, but these errors were encountered: