-
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
[Constants-Phase1] Analyzer Issue for Constants Implementation #35080
Comments
I started looking at what it would take to implement this experiment, and I found that some of the work is already done. For example, the We could potentially put the current implementation behind the flag and then revert the change to make them eagerly evaluate their arguments, but I'm concerned that that would break existing users. Are we certain that all of these changes are really different than the 2.1 behavior? How would you like me to handle this situation? |
The rules for equality ('==' and '!=') were updated on 8/23/18 (https://dart-review.googlesource.com/71340), so they are also already in 2.1. |
It seems that It does mean that there might be code out there using these features, passing the analyzer and running on the VM, so we can't retract the already working functionality. |
Thanks! @sigmundch (For the dart2js reference in the previous comment.) |
Note that when people start using the new cast and type test operators, they are likely to run into trouble due to #33441, because the analyzer doesn't always assign correct types to constants that are maps or lists. Accordingly, I'm adding a bullet item to fix #33441 before we consider the implementation complete. |
We've now completed all the implementation work we know about, but the co19 tests aren't passing, so we're investigating that. |
Note: there are some new co19 failures ( |
I'm placing this in the Dart2.3 milestone because @kmillikin and I believe some work may be necessary in order to make the analyzer and the front end behave consistently in Dart 2.3. I'll be meeting with him tomorrow to clarify the details and I'll update this bug after I do so. |
Ok, I've just finished meeting with @kmillikin. The FE is planning to ship the full functionality of this feature in Dart 2.3, so the analyzer team will plan to do so as well. |
Is there more remaining here for 2.3? ( #36296 is no longer in the milestone, but is in the meta-issue list above) |
Not all of the SDK constraint checks have been implemented, but I'm not sure that the remaining ones are worth worrying about. I don't know how @stereotype441 feels about it, but I'd be fine with closing this. |
Closing since the only remaining work is covered under #36296 |
Request: As per implementation plan,
***Analyzer and CFE
**The analyzer and CFE implements support for the new constant and potentially constant expressions behind the experimental flag.
Phase 1 ETA: please see issue [tracker] (dart-lang/language#60)
Tasks:
IsEnabledByDefault.constant_update_2018
is set totrue
The text was updated successfully, but these errors were encountered: