-
Notifications
You must be signed in to change notification settings - Fork 396
Trees in statement position may have incorrect types #4442
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
Comments
There seem to be two independent issues: When transforming Other transformations have this pattern:
Adding this fixes some of the IR checking errors. The other issue is in JS constructor export generation: The export machinery post transforms the trees generated by I have not yet been able to fix this problem (it seems that post-transforming trees is unwise, an approach that simply generates the right trees upfront seems better). |
An update on this: I'm currently working on improving how JS exporter generation works. This takes quite some time unfortunately. |
Instead of post-transforming the trees generated by GenJSExport, we re-factor the right parts and generated the proper trees right away. This was neccessary to give the generated trees the right type (partial scala-js#4442).
Instead of post-transforming the trees generated by GenJSExport, we re-factor the right parts and generated the proper trees right away. This was neccessary to give the generated trees the right type (partial scala-js#4442).
Instead of post-transforming the trees generated by GenJSExport, we re-factor the right parts and generated the proper trees right away. This was neccessary to give the generated trees the right type (partial scala-js#4442).
Instead of post-transforming the trees generated by GenJSExport, we re-factor the right parts and generated the proper trees right away. This was neccessary to give the generated trees the right type (partial scala-js#4442).
Instead of post-transforming the trees generated by GenJSExport, we re-factor the right parts and generated the proper trees right away. This was neccessary to give the generated trees the right type (partial scala-js#4442).
Instead of post-transforming the trees generated by GenJSExport, we re-factor the right parts and generated the proper trees right away. This was neccessary to give the generated trees the right type (partial scala-js#4442).
…osition In statement position, they must always be typed as NoType, since their children might be typed as such. We condition the deserialization hack introduced in the parent commit so that it only applies to old code.
…osition In statement position, they must always be typed as NoType, since their children might be typed as such. We condition the deserialization hack introduced in the parent commit so that it only applies to old code.
…osition In statement position, they must always be typed as NoType, since their children might be typed as such. We condition the deserialization hack introduced in the parent commit so that it only applies to old code.
Instead of post-transforming the trees generated by JSExportsGen, we refactor the right parts and generate the proper trees right away. This was neccessary to give the generated trees the right type (partial scala-js/scala-js#4442). Forward port of scala-js/scala-js@8093f28
Instead of post-transforming the trees generated by JSExportsGen, we refactor the right parts and generate the proper trees right away. This was neccessary to give the generated trees the right type (partial scala-js/scala-js#4442). Forward port of scala-js/scala-js@8093f28
Instead of post-transforming the trees generated by JSExportsGen, we refactor the right parts and generate the proper trees right away. This was neccessary to give the generated trees the right type (partial scala-js/scala-js#4442). Forward port of scala-js/scala-js@8093f28
Instead of post-transforming the trees generated by JSExportsGen, we refactor the right parts and generate the proper trees right away. This was neccessary to give the generated trees the right type (partial scala-js/scala-js#4442). Forward port of scala-js/scala-js@8093f28
Instead of post-transforming the trees generated by JSExportsGen, we refactor the right parts and generate the proper trees right away. This was neccessary to give the generated trees the right type (partial scala-js/scala-js#4442). Forward port of scala-js/scala-js@8093f28
Instead of post-transforming the trees generated by JSExportsGen, we refactor the right parts and generate the proper trees right away. This was neccessary to give the generated trees the right type (partial scala-js/scala-js#4442). Forward port of scala-js/scala-js@8093f28
Recent changes have all but removed the distinction between statements and expressions in the IR. Notably: * bb4f6da Allow Return arg to be a void if the target Labeled is a void. * cdcff99 Rename NoType to VoidType and print it as "void". Therefore, it made no sense anymore that `Transformer.transform` had an `isStat` argument. In fact, the first of the two commits mentionned above semi-broke the semantics of that argument anyway. Moreover, `isStat` was never *used* in our codebase (only forwarded everywhere for no reason). The only exception was a deserialization hack for IR <= 1.5. This one was already hacking around the fact the IR produced back then was not well-typed. See scala-js#4442 for context. We now remove that parameter everywhere. It makes the deserialization hack a bit more verbose, but everything else becomes simpler.
See: #4439 (comment)
The text was updated successfully, but these errors were encountered: