-
Notifications
You must be signed in to change notification settings - Fork 268
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
Fix: Support for user-defined module fmt for all compilers #5441
Fix: Support for user-defined module fmt for all compilers #5441
Conversation
Yes, this fixed the issue you opened, but the underlying problem still persists. Here's another problematic program. module time {}
method Main(){
print "done\n";
} They are all reserved by the GO standard library. I would prefer to merge a more comprehensive fix. |
@@ -686,8 +686,11 @@ private class ClassWriter : IClassWriter { | |||
} | |||
|
|||
private string FullName(TopLevelDecl decl) { | |||
var localDefinition = decl.EnclosingModuleDefinition == enclosingModule; | |||
return IdProtect(localDefinition ? decl.GetCompileName(Options) : decl.GetFullCompileName(Options)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I messed with this a little. Maybe you can have double check it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to evaluate if this is good or not. I'll let the CI test this new behavior.
Co-authored-by: Fabio Madge <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR fixes #5283
I added the corresponding test.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.