Commit 0c1394f
committed
Handle tracked class parameters
The current handling of class type refinements is unsound. We cannot simply
use a variable for the capture set of a class argument. What we need to do
instead is treat class arguments as tracked.
In this commit we at least allow explicitly declared tracked arguments. This needed
two modifications:
- Don't additionally add a capture set for tracked arguments
- Handle the case where a capture reference is of a singleton type which
is another capture reference.
As a next step we should treat all class arguments as implicitly tracked.1 parent 0268185 commit 0c1394f
File tree
3 files changed
+17
-3
lines changed- compiler/src/dotty/tools/dotc
- cc
- core
3 files changed
+17
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
| |||
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6162 | 6162 | | |
6163 | 6163 | | |
6164 | 6164 | | |
6165 | | - | |
6166 | | - | |
| 6165 | + | |
| 6166 | + | |
| 6167 | + | |
| 6168 | + | |
| 6169 | + | |
| 6170 | + | |
| 6171 | + | |
| 6172 | + | |
| 6173 | + | |
6167 | 6174 | | |
6168 | 6175 | | |
6169 | 6176 | | |
| |||
0 commit comments