-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
discrepency between CFE and analyzer's operator == override #50628
Comments
The analyzer implements what is written in the specification. |
Agreed, the operator The section from the language specification is pre-nnbd (see dart-lang/language#2605 for the proposed updates to include null safety). The main difference here is that covariant parameters are given the type The signature of |
Yes. The ability to allow the legacy handling of the |
It sounds like we can decide that the current behaviors of the CFE and the analyzer are OK. There is a slight inconsistency, but it will go away when the support for legacy code is removed. Moreover, there is no soundness issue as far as I can see: As specified, operator |
@sigmundch, I believe the web compilers may treat operator |
Your understanding is correct @eernstg - dart2js moves the Until recently, we actually relied on the CFE behavior to not complain on |
So here's a possible conclusion: The CFE continues to have the special treatment of operator Please comment if you see a problem with this. |
See this example from @yanok (dartpad):
This program runs without error, but analyzer reports an
invalid_implementation_override
error at line 6 (class B implements A {}
):There is either a bug in analyzer or CFE.
cc @scheglov
The text was updated successfully, but these errors were encountered: