-
Notifications
You must be signed in to change notification settings - Fork 26
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
Typechecker fails when creating an object in array initialization #138
Comments
if you turn the line: |
That is not so strange.
and we don't have inference working for arbitrary statements, it seems. Or maybe inference is broken in combination with desugaring? |
So, I would update the ticket to say that it is not |
My bet is on the desugaring step! The error-message happens because the constructor leaked through to the typechecker, suggesting that desugaring does not check inside arrays. Indeed, |
If this really is the bug and I'm not mistaken, it could have been caught by exhaustiveness checking: if |
@kaeluka: I agree. I wrote |
closed via PR #147 |
The following minimal test case produces the error
Cannot typecheck expression new Foo("bug")
It does work if you create the object first and then initialize the array.
So the problem seems to only appear when you use
new
in the initialization.The text was updated successfully, but these errors were encountered: