Skip to content

Conversation

@sjrd
Copy link
Member

@sjrd sjrd commented Apr 26, 2023

Implicit references to the this of an outer class are made explicit by the typer, and they need to be for explicitOuter to do its job correctly.

When we desugar a js.dynamicImport, we move the code inside a synthetic inner class. If it contains implicit references to an enclosing class, we must make them explicit at that point.

…ts explicit.

Implicit references to the `this` of an outer class are made
explicit by the typer, and they need to be for `explicitOuter` to
do its job correctly.

When we desugar a `js.dynamicImport`, we move the code inside a
synthetic inner class. If it contains implicit references to an
enclosing class, we must make them explicit at that point.
@sjrd sjrd requested a review from nicolasstucki April 26, 2023 14:04
@sjrd sjrd linked an issue Apr 26, 2023 that may be closed by this pull request
@nicolasstucki nicolasstucki merged commit f128063 into scala:main Apr 27, 2023
@nicolasstucki nicolasstucki deleted the sjs-implicit-this-in-dynamic-import branch April 27, 2023 08:34
@Kordyjan Kordyjan added this to the 3.3.1 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scala.js optimizer crashes when using js.dynamicImport

3 participants