Commit 7424073
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 718f2de commit 7424073
File tree
5 files changed
+43
-3
lines changed- compiler/src/dotty/tools/dotc
- core
- tasty
- typer
- tests/pos/i22436
5 files changed
+43
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
12 | 31 | | |
13 | 32 | | |
14 | 33 | | |
| |||
118 | 137 | | |
119 | 138 | | |
120 | 139 | | |
121 | | - | |
| 140 | + | |
122 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
123 | 148 | | |
124 | 149 | | |
125 | 150 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| 151 | + | |
| 152 | + | |
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1089 | 1089 | | |
1090 | 1090 | | |
1091 | 1091 | | |
1092 | | - | |
| 1092 | + | |
| 1093 | + | |
1093 | 1094 | | |
1094 | 1095 | | |
1095 | 1096 | | |
| |||
1691 | 1692 | | |
1692 | 1693 | | |
1693 | 1694 | | |
| 1695 | + | |
1694 | 1696 | | |
1695 | 1697 | | |
1696 | 1698 | | |
| |||
| 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