You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_docs/internals/cc/alternatives-to-sealed.md
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,11 @@ A capture checking variant
7
7
8
8
- We now treat all type variables as sealed (so no special `sealed` modifier is necessary anymore). A type variable cannot be instantiated to a type that contains a covariant occurrence of `cap`. The same restriction applies to the types of mutable variables and try expressions.
9
9
10
+
- For any immutable variable `x`, introduce a _reach_ capability `x*` which stands for
11
+
"all capabilities reachable through `x`". We have `{x} <: {x*} <: dcs(x)}` where the deep capture set `dcs(x)` of `x`
12
+
is the union of all capture sets that appear in covariant position in the type of `x`. If `x` and `y` are different
0 commit comments