Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 1808123005: First batch of changes to make analyzer package strong mode error free (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index da248938d0da3cc8d85c8151f21e848ad166dd17..1775a0dc5c95859974abe680dd1eee7dac79aa1e 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -3185,8 +3185,8 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
* the given [name].
*/
LibraryElementImpl.forNode(this.context, LibraryIdentifier name)
- : super.forNode(name),
- nameLength = name != null ? name.length : 0;
+ : nameLength = name != null ? name.length : 0,
+ super.forNode(name);
@override
int get codeLength {
@@ -3591,14 +3591,16 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
// are in the case where library cycles have simply never been computed from
// a newly reachable node.
Set<LibraryElementImpl> active = new HashSet();
- void invalidate(LibraryElementImpl library) {
- if (!active.add(library)) return;
- if (library._libraryCycle != null) {
- library._libraryCycle.forEach(invalidate);
- library._libraryCycle = null;
+ void invalidate(LibraryElement library) {
+ LibraryElementImpl libraryImpl = library;
+ if (active.add(libraryImpl)) {
+ if (libraryImpl._libraryCycle != null) {
+ libraryImpl._libraryCycle.forEach(invalidate);
+ libraryImpl._libraryCycle = null;
+ }
+ library.exportedLibraries.forEach(invalidate);
+ library.importedLibraries.forEach(invalidate);
}
- library.exportedLibraries.forEach(invalidate);
- library.importedLibraries.forEach(invalidate);
}
invalidate(this);
}

Powered by Google App Engine
This is Rietveld 408576698