Commit 7c96eed
committed
Fix #17344: Make implicit references to this above dynamic imports 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.1 parent 7a6dc76 commit 7c96eed
File tree
3 files changed
+73
-1
lines changed- compiler/src/dotty/tools/dotc/transform/sjs
- project
- tests/sjs-junit/test-require-multi-modules/org/scalajs/testsuite/jsinterop
3 files changed
+73
-1
lines changedLines changed: 32 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
96 | 114 | | |
97 | 115 | | |
98 | 116 | | |
| |||
297 | 315 | | |
298 | 316 | | |
299 | 317 | | |
| 318 | + | |
| 319 | + | |
300 | 320 | | |
301 | 321 | | |
302 | 322 | | |
303 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
304 | 327 | | |
305 | 328 | | |
306 | 329 | | |
| |||
310 | 333 | | |
311 | 334 | | |
312 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
313 | 344 | | |
314 | 345 | | |
315 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1219 | 1219 | | |
1220 | 1220 | | |
1221 | 1221 | | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
1222 | 1234 | | |
1223 | 1235 | | |
1224 | 1236 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments