-
Notifications
You must be signed in to change notification settings - Fork 159
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
typedef should be defined in the current scope #346
Comments
I guess a longer term solution would be to incorporate the function name into the type. However, I agree that its a pretty silly thing to do and I have never seen it done in code either. I didn't even know you could do that until you raised the issue... |
Could you solve that point at globally? Preliminary steps:
At the end:
Nice prototype of that changes see #345. Generally, prototype is work(only one FAIL in transpiling of file |
One more note for step 4 : change |
@Konstantin8105 I think that is too much since typedefs cannot be nested in anything - only some node types. Also there is the |
@elliotchance Yes are right, if we think only about a |
Typedefs are always transpile into global-scope go types. We should preserve the scope in which they were defined.
I have not seen real world example of that, and I would think it is a bad practice to reuse the same name for 2 different types. For those reasons I would label this issue as a "Low". We can fix it when we encounter the problem.
P.S. This could happen when importing a library.
Currently transpiles to:
Ref: #272
The text was updated successfully, but these errors were encountered: