Commit 27f4a94
authored
Avoid stackoverflow in ExplicitOuter (#16381)
When transforming a class at ExplicitOuter we create outer accessors for
it. The newSymbol call to do this takes place at phase ExplicitOuter +
1, but its arguments need to be evaluated at phase ExplicitOuter. This
was not true for the nestingLevel argument, which demanded the
denotation of the class at phase ExplicitOuter + 1, thus leading to the
SO.
Interestingly, the same path is not taken if the class has all abstract
members defined or is declared abstract. It's only in the error case
that I could reproduce the SO.
Fixes #16343File tree
2 files changed
+4
-1
lines changed- compiler/src/dotty/tools/dotc/transform
- tests/neg
2 files changed
+4
-1
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
179 | 180 | | |
180 | | - | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments