Skip to content

Commit 2237eb7

Browse files
committed
Note problem with variant.
1 parent a8fc57d commit 2237eb7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/_docs/internals/cc/alternatives-to-sealed.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ A capture checking variant
1919
prevent the formation. This strictness is necessary to ensure soundness
2020
of the modified (Var) rule described below.
2121

22+
NOTE: This restrictions might make things difficult. For instance,
23+
we want to have:
24+
25+
A^ -> B <: A^{x} -> B
26+
27+
but with the rule above this no longer holds.
28+
2229
- To compensate, and allow capture polymorphism in e.g. function arguments, we allow
2330
some subcapture slack to covariant cap when comparing the types of actual and expected types
2431
after rechecking. This has to be done selectively, so that the following are still guaranteed:

0 commit comments

Comments
 (0)