-
Notifications
You must be signed in to change notification settings - Fork 125
Fix const declaration cosmetics and avoid use of computeNode for information analyzer already has. #1585
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…-package-docs+const-declaration
…-package-docs+const-declaration
devoncarew
approved these changes
Jan 8, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1576.
The constant declaration handling has been a frequent source of bugs, so this also includes an improvement on the fix for #1535 and a bit of work on #1375. Add const where appropriate and avoid reading the source code when calculating the initializer, as complicated expressions can hide information from the docs otherwise. The analyzer rationalizes them, so make use of that in at least one case and link the result. (There are more possibilities to expand the linkifier, but that can wait for a future PR).
Also fixes some inconsistencies introduced in #1581 where page titles for constants weren't indicating that they were constant.
Most of these changes have minor impacts cosmetically.
The test package's ex library list of top-level constants, before (at head):


and after:
The test package's MY_CAT constant, before:


and after:
The dart:io SDK library's APPEND top-level constant, before:


and after:
And finally, the dart:io SDK library's FileMode class's constant, APPEND, before:


and after: