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

Side by Side Diff: pkg/analyzer/lib/src/generated/element.dart

Issue 971193003: Don't set a propagate type if the variable has already the same static type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.element; 8 library engine.element;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 6320 matching lines...) Expand 10 before | Expand all | Expand 10 after
6331 typeArguments.length != typeParameters.length) { 6331 typeArguments.length != typeParameters.length) {
6332 return supertype; 6332 return supertype;
6333 } 6333 }
6334 return supertype.substitute2(typeArguments, typeParameters); 6334 return supertype.substitute2(typeArguments, typeParameters);
6335 } 6335 }
6336 6336
6337 @override 6337 @override
6338 List<TypeParameterElement> get typeParameters => element.typeParameters; 6338 List<TypeParameterElement> get typeParameters => element.typeParameters;
6339 6339
6340 @override 6340 @override
6341 bool operator ==(Object object) => 6341 bool operator ==(Object object) {
6342 internalEquals(object, new HashSet<ElementPair>()); 6342 if (identical(object, this)) {
Brian Wilkerson 2015/03/03 14:53:49 I'm not sure why this logic needs to be duplicated
scheglov 2015/03/03 15:02:17 Here we have a chance to check quickly without cre
6343 return true;
6344 }
6345 return internalEquals(object, new HashSet<ElementPair>());
6346 }
6343 6347
6344 @override 6348 @override
6345 void appendTo(StringBuffer buffer, Set<DartType> visitedTypes) { 6349 void appendTo(StringBuffer buffer, Set<DartType> visitedTypes) {
6346 if (!visitedTypes.add(this)) { 6350 if (!visitedTypes.add(this)) {
6347 buffer.write(name == null ? '...' : name); 6351 buffer.write(name == null ? '...' : name);
6348 return; 6352 return;
6349 } 6353 }
6350 buffer.write(name); 6354 buffer.write(name);
6351 int argumentCount = typeArguments.length; 6355 int argumentCount = typeArguments.length;
6352 if (argumentCount > 0) { 6356 if (argumentCount > 0) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
6425 @override 6429 @override
6426 MethodElement getMethod(String methodName) => MethodMember.from( 6430 MethodElement getMethod(String methodName) => MethodMember.from(
6427 (element as ClassElementImpl).getMethod(methodName), this); 6431 (element as ClassElementImpl).getMethod(methodName), this);
6428 6432
6429 @override 6433 @override
6430 PropertyAccessorElement getSetter(String setterName) => PropertyAccessorMember 6434 PropertyAccessorElement getSetter(String setterName) => PropertyAccessorMember
6431 .from((element as ClassElementImpl).getSetter(setterName), this); 6435 .from((element as ClassElementImpl).getSetter(setterName), this);
6432 6436
6433 @override 6437 @override
6434 bool internalEquals(Object object, Set<ElementPair> visitedElementPairs) { 6438 bool internalEquals(Object object, Set<ElementPair> visitedElementPairs) {
6439 if (identical(object, this)) {
6440 return true;
6441 }
6435 if (object is! InterfaceTypeImpl) { 6442 if (object is! InterfaceTypeImpl) {
6436 return false; 6443 return false;
6437 } 6444 }
6438 InterfaceTypeImpl otherType = object as InterfaceTypeImpl; 6445 InterfaceTypeImpl otherType = object as InterfaceTypeImpl;
6439 return (element == otherType.element) && 6446 return (element == otherType.element) &&
6440 TypeImpl.equalArrays( 6447 TypeImpl.equalArrays(
6441 typeArguments, otherType.typeArguments, visitedElementPairs); 6448 typeArguments, otherType.typeArguments, visitedElementPairs);
6442 } 6449 }
6443 6450
6444 @override 6451 @override
(...skipping 4639 matching lines...) Expand 10 before | Expand all | Expand 10 after
11084 // void <: void (by reflexivity) 11091 // void <: void (by reflexivity)
11085 // bottom <: void (as bottom is a subtype of all types). 11092 // bottom <: void (as bottom is a subtype of all types).
11086 // void <: dynamic (as dynamic is a supertype of all types) 11093 // void <: dynamic (as dynamic is a supertype of all types)
11087 return identical(type, this) || type.isDynamic; 11094 return identical(type, this) || type.isDynamic;
11088 } 11095 }
11089 11096
11090 @override 11097 @override
11091 VoidTypeImpl substitute2( 11098 VoidTypeImpl substitute2(
11092 List<DartType> argumentTypes, List<DartType> parameterTypes) => this; 11099 List<DartType> argumentTypes, List<DartType> parameterTypes) => this;
11093 } 11100 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | pkg/analyzer/lib/src/generated/static_type_analyzer.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698