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

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/scope.dart

Issue 177963002: Use List instead of Link in the type system. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 6 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: sdk/lib/_internal/compiler/implementation/resolution/scope.dart
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/scope.dart b/sdk/lib/_internal/compiler/implementation/resolution/scope.dart
index ebc83d6393cca63ec10e8bff4b047321113e3a7f..79fdacf1115744d3dd45e3794d9d07ea7bced7ce 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/scope.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/scope.dart
@@ -74,13 +74,11 @@ class TypeDeclarationScope extends NestedScope {
}
Element lookupTypeVariable(String name) {
- Link<DartType> typeVariableLink = element.typeVariables;
- while (!typeVariableLink.isEmpty) {
- TypeVariableType typeVariable = typeVariableLink.head;
- if (typeVariable.name == name) {
- return typeVariable.element;
+ List<DartType> typeVariables = element.typeVariables;
+ for (TypeVariableType type in typeVariables) {
+ if (type.name == name) {
+ return type.element;
}
- typeVariableLink = typeVariableLink.tail;
}
return null;
}

Powered by Google App Engine
This is Rietveld 408576698