-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Regression in function type checking #25743
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
This is with analyzer tip. I don't see an error in 1.14.0-dev.5.0. |
Let me try that as well after https://codereview.chromium.org/1678313002/ ... we were dropping the fuzzy arrows flag in a few places. |
Oh, nvm, my CL only affects generic functions. I thought we interpreted |
I believe @leafpetersen had some logic to handle references to top-level functions - and treat the param type as top. |
Oh, hmmmm. I haven't seen any code like that, but that would work. Vijay, could this regression be caused by our change to get rid of UninferredClosure? We were messing with DownCast.create ... specifically making top level functions fall into an "error" path :) |
But whatever it was, none of our checker tests caught it, so I'm not sure... |
Actually, isn't this a dupe of #24507? |
Yeah, I think it's the same - thanks for merging. I think the "regression" is really a warning changing to an error - which is exactly what you're saying. :-) Note, this is causing a break of sorts when I run ddc presubmit tests against analyzer tip, but only because one of the async tests we explicitly run at the end of browser_tests is no longer generated (due to warning promoted to error and no force compile I believe). |
DOH! In the short term maybe work around it in the test? And I also bumped the priority of #24507. If we do want to special case original function declarations, we can certainly do that in DownCast.create. |
The following code used to work fine (no strong mode errors).
It now gives a static error:
I believe we used to treat
foo
astop -> void
?@leafpetersen
The text was updated successfully, but these errors were encountered: