You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alaviss
changed the title
macro generated type with field containing '`' cannot be accessed
macro generated objects with field name containing '`' cannot be accessed
Jul 11, 2024
## Summary
Fix a regression where field names with backticks in them couldn't be
accessed with a field access.
Fixes#1379.
## Details
* identifier nodes resulting from gensyms are now tagged with a new
node flag (`nfWasGensym`)
* `originalName` only strips the `gensym` suffix from identifiers
marked with the flag
* the node flag is persistent, so that it stays on the node across tree
copies
Looking for the full "`gensym" suffix wouldn't work, because it would
also trigger the stripping for user-created names containing the
suffix.
Example
Actual Output
Expected Output
This should compile normally
Additional Information
`gensym
in their repr.`
character is key to triggering this bug. Other special characters does not seem to cause any problems.Generated code:
AST form:
The text was updated successfully, but these errors were encountered: