-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Inline constructors vs. Void (continued) #11396
Comments
I'd expect this to fail during type checking and thus never reach the constructor inliner logic. Is that not supposed to be the case? |
It's not always possible during the initial pass because of type inference. A silly example: function f() {}
function main() {
var tmp = null;
[$type(tmp())]; // Unknown<0>
tmp = f;
$type(tmp()); // Void
} Here we don't know the type of There may be better ways to handle this altogether, but at the moment it can happen like this. |
Ok, I'll give it some thought. Maybe cancelling inlining if one of the inlined fields is found to be of type Void would suffice. |
This code kills the analyzer with a stack overflow:
While I definitely want to fix that in the analyzer too, the code that comes out of the inline constructor processing has a problem too:
There shouldn't be an empty
TBlock
in a value place.cc @basro
The text was updated successfully, but these errors were encountered: