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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/universe/universe.dart

Issue 11348243: Fix braino in Selector.==: check the kind too. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/language/interceptor2_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library universe; 5 library universe;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../dart2jslib.dart'; 9 import '../dart2jslib.dart';
10 import '../tree/tree.dart'; 10 import '../tree/tree.dart';
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 } 323 }
324 324
325 bool operator ==(other) { 325 bool operator ==(other) {
326 if (other is !Selector) return false; 326 if (other is !Selector) return false;
327 return identical(receiverType, other.receiverType) 327 return identical(receiverType, other.receiverType)
328 && equalsUntyped(other); 328 && equalsUntyped(other);
329 } 329 }
330 330
331 bool equalsUntyped(Selector other) { 331 bool equalsUntyped(Selector other) {
332 return name == other.name 332 return name == other.name
333 && kind == other.kind
333 && identical(library, other.library) 334 && identical(library, other.library)
334 && argumentCount == other.argumentCount 335 && argumentCount == other.argumentCount
335 && namedArguments.length == other.namedArguments.length 336 && namedArguments.length == other.namedArguments.length
336 && sameNames(namedArguments, other.namedArguments); 337 && sameNames(namedArguments, other.namedArguments);
337 } 338 }
338 339
339 List<SourceString> getOrderedNamedArguments() { 340 List<SourceString> getOrderedNamedArguments() {
340 if (namedArguments.isEmpty) return namedArguments; 341 if (namedArguments.isEmpty) return namedArguments;
341 if (!orderedNamedArguments.isEmpty) return orderedNamedArguments; 342 if (!orderedNamedArguments.isEmpty) return orderedNamedArguments;
342 343
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 ClassElement cls = self; 439 ClassElement cls = self;
439 if (cls.isSubclassOf(other)) { 440 if (cls.isSubclassOf(other)) {
440 // Resolve an invocation of [element.name] on [self]. If it 441 // Resolve an invocation of [element.name] on [self]. If it
441 // is found, this selector is a candidate. 442 // is found, this selector is a candidate.
442 return hasElementIn(self, element) && appliesUntyped(element, compiler); 443 return hasElementIn(self, element) && appliesUntyped(element, compiler);
443 } 444 }
444 445
445 return false; 446 return false;
446 } 447 }
447 } 448 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/interceptor2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698