-
-
Notifications
You must be signed in to change notification settings - Fork 249
Playground: Recursive tree with polymorphic variants blows up the stack #716
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
Ok, so the polymorphic one also compiles when it's typed out and annotated! |
To summarize the issue:
|
Fixed now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following example yields a stack overflow error on the playground
https://rescript-lang.org/try?version=v11.0.0-beta.4&code=DYUwLgBATiDGEGcCuBbCBeCAPDA+AUBIgO4CWYsAFthAN6EQA+EAxADIgCGAZnhAAwNmLAHIB7ACYgAFADdOwJCAA0EUNzCqopAOaUwASj7zFICAGo1IDQFpcyNJe16wdhwwC++fKEgoAngAqMGaYopIyDACMygzhUtIATKrxMgAsKRw8mVzcBiniCQBsOdmsWXn5cYUyAMwFEdIArKXcrfmsNdIA7K3tVQbevhDSRpgBwSAgbqh2AFIIAHTAYjr4QA
The same with normal variants does not
https://rescript-lang.org/try?version=v11.0.0-beta.4&code=C4TwDgpgBAThDGVhwgHgOQDcCGAbArhAHxQC8AUFFAD5QAyE2AZpTVAHID2AJhABRY8hADRIUGHAWKjkENIKlEAlOXK4IwWAigBnfAFsyUAB5kirHQHcAlsHgALE1ADerWg2ZmoABjcce-JIiUOpMwKIw1gDm9sBKXkHQANQhEGEAtER6himRMcCZ2awAvqrqmvogACooRly8fKwAjMKs9fwATKLtfAAsoh5MA4xMSt0BfABsw8wzo2NtEwDM4w0ArHNzY-4NAOyb9CNKCypqGlB88aRQlTVyhQaZAFI6AHS4nFHkQA
Melange Playground can do the polymorphic one without problems:
https://melange.re/unstable/playground/?language=Reason&code=bGV0IHJlYyBzdW0gPSBmdW4KICB8IGBMZWFmID0%2BIDAKICB8IGBOb2RlKHZhbHVlLCBsZWZ0LCByaWdodCkgPT4gdmFsdWUgKyBsZWZ0LT5zdW0gKyByaWdodC0%2Bc3VtCgpsZXQgbXlUcmVlID0gYE5vZGUoCiAgMSwKICBgTm9kZSgyLCBgTm9kZSg0LCBgTGVhZiwgYExlYWYpLCBgTm9kZSg2LCBgTGVhZiwgYExlYWYpKSwKICBgTm9kZSgzLCBgTm9kZSg1LCBgTGVhZiwgYExlYWYpLCBgTm9kZSg3LCBgTGVhZiwgYExlYWYpKSwKKQoKbGV0ICgpID0gbXlUcmVlLT5zdW0tPkpzLmxvZwo%3D&live=off
I also tested the polyvariants example locally with ReScript 11, where it compiles fine.
The text was updated successfully, but these errors were encountered: