-
Notifications
You must be signed in to change notification settings - Fork 469
class are being removed when migrating .re to .res #5104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Code conversion blocked by rescript-lang/rescript#5104
Support for ocaml style classes was removed in 9.1. I wonder if they are truly necessary for the bindings, though. |
hi @MoOx technically we did not remove class types, it is not exposed in rescript syntax though, so you don't need rush to convert such piece of code if you are busy, but you are suggested to migrate away from class types later. Note in the latest release, you can compose structural types using object types (without need class types) type small = {
"x" : int
}
type big = {
... small, "y" : int
} let me know if you find something not expressible using object types |
To be honest, I don't see any real reason to use class. I will just convert to record and use |
Thank you for filing! Check list:
How to reproduce?
Use this
Try using
bsc -format
. The code just disappear. You can reproduce on the playground too (select .RE, paste the snippet, click on .RES, no more class).This is a problem for rescript-react-navigation as we have a lot of class to bind.
The text was updated successfully, but these errors were encountered: