-
-
Notifications
You must be signed in to change notification settings - Fork 670
fix: handle void to void during convertExpression
#2412
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
Conversation
convertExpression
convertExpression
Co-authored-by: Max Graey <maxgraey@gmail.com>
Iirc the idea of the assert is that if one converts nothing to nothing, then there isn't an expression to begin with that can be consumed as part of the conversion. Conceptionally, this would be a drop of a drop, but there's nothing to drop, so nothing to produce. As such I wonder if hitting the assertion in the first place is a sign that other code does something wrong prior? |
Yeah, btw |
Perhaps we should add new UNKNOWN type kind as a top type which always should be resolved at the end (or at first access). In this case we could distinguish VOID from uninit expressions better for such cases |
@dcodeIO Because it used a un-initialized Global and throw Diagnosis before. So the |
@dcodeIO What is your opinion about this PR? |
Tried to come up with a comment so, in case we ever run into issues here, we know what was the intention :) |
Co-authored-by: dcode <dcode@dcode.io>
Thanks! |
Fix: #2205