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
* Test: allow free vars in types for coercion.
See rescript-lang#6821
Free variables are not allowed in coercion, and if that happens, simple unification is performed without ever attempting coercion. This seems to go back a very long time.
There's probably a good reason why free vars were not allowed. At the same time, there are no objects/classes supported in the language anymore, so it's not clear how those reasons would adapt.
This just marks the place where one could investigate.
* Add tests of type coercion with free vars.
* Clean up code for coercion and free variables.
* Update CHANGELOG.md
* Remove unused code for self coercion.
* Remove unused error that suggests double coercion.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@
17
17
- Allow `@directive` on functions for emitting function level directive code (`let serverAction = @directive("'use server'") (~name) => {...}`). https://github.com/rescript-lang/rescript-compiler/pull/6756
18
18
- Add `rewatch` to the npm package as an alternative build tool. https://github.com/rescript-lang/rescript-compiler/pull/6762
19
19
- Throws an instance of JavaScript's `new Error()` and adds the extension payload for `cause` option. https://github.com/rescript-lang/rescript-compiler/pull/6611
20
+
- Allow free vars in types for type coercion `e :> t`. https://github.com/rescript-lang/rescript-compiler/pull/6828
0 commit comments