Commit e92dd4d
committed
Avoid stackoverflow in ExplicitOuter
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.1 parent e09175e commit e92dd4d
File 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