-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Adding a genSym-ed field with the same name as a pre-existing field causes redefinition error in an object definition #17851
Comments
alaviss
added a commit
to alaviss/cps
that referenced
this issue
Apr 26, 2021
This is a WIP commit. Experiments shows that we only have to desym due to issues in environment definition and access. Upstream bug: nim-lang/Nim#17851 This commit disable blanket desymification and only perform them on environment as a workaround for the mentioned bug, which fixes the foreign symbol tests.
alaviss
added a commit
to alaviss/cps
that referenced
this issue
Apr 27, 2021
This is a WIP commit. Experiments shows that we only have to desym due to issues in environment definition and access. Upstream bug: nim-lang/Nim#17851 This commit disable blanket desymification and only perform them on environment as a workaround for the mentioned bug, which fixes the foreign symbol tests.
alaviss
added a commit
to alaviss/cps
that referenced
this issue
Apr 28, 2021
A proper workaround for nim-lang/Nim#17851, which lets us remove the desym injections into cps/environment.
disruptek
pushed a commit
to nim-works/cps
that referenced
this issue
Apr 28, 2021
* cps, cps/environment: only desym environment access This is a WIP commit. Experiments shows that we only have to desym due to issues in environment definition and access. Upstream bug: nim-lang/Nim#17851 This commit disable blanket desymification and only perform them on environment as a workaround for the mentioned bug, which fixes the foreign symbol tests. * cps: disable blanket desym with comments * cps: nicer getCallSym interface * cps/environment: don't desym Env type The better fix in #72 removed the need for this 🎉. * cps/[environment, spec]: added genField for generating object fields A proper workaround for nim-lang/Nim#17851, which lets us remove the desym injections into cps/environment. * cps: cater getCallSym to reviews * cps/spec: English is hard
This was referenced Oct 25, 2022
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Example
Current Output
Expected Output
Compiles successfully.
Possible Solution
The record field redefinition check within the compiler matches against the node name:
Nim/compiler/semtypes.nim
Lines 805 to 806 in 9e6f2d7
This doesn't work with genSym-ed symbols.
Additional Information
The text was updated successfully, but these errors were encountered: