Commit 62975d3
committed
heal ill-formed capture sets in type parameters
Given an applied function `f[cs A](g)`, where the type of `f` is `[T] -> (x: {*}
C) -> T` and the type of `g` is dependent, e.g. `(x: {*} Cap) -> {x} A`, the
reference `x` may be propagate to cs.
But this makes `cs A` ill-formed since it is not allowed to mention `{x}`. This
sometimes cause soundness problems.
We heal this by pushing the capture set of `{x}` into cs.1 parent f45e083 commit 62975d3
1 file changed
+31
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
894 | 912 | | |
895 | 913 | | |
896 | 914 | | |
| |||
949 | 967 | | |
950 | 968 | | |
951 | 969 | | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
952 | 983 | | |
953 | 984 | | |
954 | 985 | | |
| |||
0 commit comments