Commit 9704b0c
committed
Support cleanup actions in class completers
Needed to break the loop between completion of class and companion object.
If we try to complete the class first, and completion needs the companion
object (for instance for processing an import) then the companion object
completion would consult the companion class info for constructor that
need a constructor proxy in the object. This can lead to a cyclic reference.
We now break the cycle by delaying adding constructor proxies in this case
to be the last completion action of the companion class.1 parent 01447df commit 9704b0c
File tree
5 files changed
+44
-4
lines changed- compiler/src/dotty/tools/dotc
- core
- tasty
- typer
- tests/pos/i22436
5 files changed
+44
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
17 | 36 | | |
18 | 37 | | |
19 | 38 | | |
| |||
164 | 183 | | |
165 | 184 | | |
166 | 185 | | |
167 | | - | |
| 186 | + | |
168 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
169 | 194 | | |
170 | 195 | | |
171 | 196 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| 172 | + | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
668 | 671 | | |
669 | 672 | | |
670 | 673 | | |
671 | | - | |
| 674 | + | |
672 | 675 | | |
673 | 676 | | |
674 | 677 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1141 | 1141 | | |
1142 | 1142 | | |
1143 | 1143 | | |
1144 | | - | |
| 1144 | + | |
| 1145 | + | |
1145 | 1146 | | |
1146 | 1147 | | |
1147 | 1148 | | |
| |||
1764 | 1765 | | |
1765 | 1766 | | |
1766 | 1767 | | |
| 1768 | + | |
1767 | 1769 | | |
1768 | 1770 | | |
1769 | 1771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments