Commit 6baff2d
committed
Drop convention on classes inheriting from universal capturing types
Drop convention that classes inheriting from universal capturing types are capability classes. Capture sets of parents
are instead ignored.
The convention led to algebraic anomalies. For instance if
class C extends A => B, Serializable
then C <: (A => B) & Serializable, which has an empty capture set. Yet we treat every occurrence of C as
implicitly carrying `cap`.1 parent b76bc3e commit 6baff2d
File tree
3 files changed
+1
-29
lines changed- compiler/src/dotty/tools/dotc
- cc
- transform
- tests/pos-custom-args/captures
3 files changed
+1
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | 70 | | |
95 | 71 | | |
96 | 72 | | |
| |||
317 | 293 | | |
318 | 294 | | |
319 | 295 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
| 296 | + | |
324 | 297 | | |
325 | 298 | | |
326 | 299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
0 commit comments