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
Note that there is no subtype relation between `(erased T) => R` and `T => R` (or `(given erased T) => R` and `(given T) => R`)
42
+
Note that there is no subtype relation between `(erased T) => R` and `T => R` (or `(given erased T) => R` and `(given T) => R`). The `erased` parameters must match exactly in their respective positions.
43
43
44
44
45
45
4. Eta expansion
@@ -51,7 +51,8 @@ TODO: complete
51
51
*All `erased` parameters are removed from the function
52
52
*All argument to `erased` parameters are not passed to the function
*Member definitions overriding each other must both be `erased` or not be `erased`
64
-
* `def foo(x: T): U` cannot be overridden by `def foo(erased x: T): U` and vice-versa
65
-
*
66
-
64
+
*Member definitions overriding each other must both be `erased` or not be `erased`.
65
+
* `def foo(x: T): U` cannot be overridden by `def foo(erased x: T): U` and vice-versa.
67
66
68
67
8. TypeRestrictions
69
68
*For dependent functions, `erased` parameters are limited to realizable types, that is, types that are inhabited by non-null values.
70
69
This restriction stops us from using a bad bound introduced by an erased value, which leads to unsoundness (see #4060).
70
+
*Polymorphic functions with erased parameters are currently not supported, and will be rejected by the compiler. This is purely an implementation restriction, and might be lifted in the future.
0 commit comments