Commit 6d9b0f1
authored
Fix stack overflow errors when generating opaque type proxies (#22479)
Before the regressive PR, we would check via the generated opaqueProxies
list whether one was already generated. In that PR, we tried allowing
generating proxies for rhs of currently generated proxy. Since we have
to add the generated proxy to opaqueProxies only after that step, this
could cause infinite recursion (and adding the proxies earlier could
cause another infinite loop).
To fix that, we add another collection for termrefs which we already
visited this way, but which is not used in the `mapOpaques` function.1 parent 4ab5c5d commit 6d9b0f1
File tree
2 files changed
+15
-1
lines changed- compiler/src/dotty/tools/dotc/inlines
- tests/pos
2 files changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
387 | 390 | | |
388 | 391 | | |
389 | 392 | | |
| |||
401 | 404 | | |
402 | 405 | | |
403 | 406 | | |
404 | | - | |
| 407 | + | |
405 | 408 | | |
| 409 | + | |
406 | 410 | | |
407 | 411 | | |
408 | 412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments