-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Imports clobber field names in locally defined structs #88
Comments
hm. i was aware that local names got stamped on, but i thought they got stamped everywhere including in the struct access. we probably need to widen the search/replace to catch i realise this is not a nice approach, but more sophisticated handling requires AST context, which we can't currently obtain without a complete/working shader as input. |
That makes sense actually. It sounds like the current behavior is from #31? If there's already an exception carved out for identifiers following |
That sounds like a better idea. |
What about switch statements? They can also have a colon after a variable name.
|
Perhaps it’s best to explicitly disallow shadowing of modules with variables then. Though we can’t easily prevent it in field names of imported structs … |
This code produces this error:
If I amend the code to not import a symbol named
bar
, the error goes away. But it took a lot more debugging than I'd have liked to figure out that that's what was happening.The text was updated successfully, but these errors were encountered: