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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/element.dart

Issue 23080005: New analysis_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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_experimental/lib/src/generated/element.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/element.dart b/pkg/analyzer_experimental/lib/src/generated/element.dart
index 5df3e1e7fcdb490803ad333747321fa70e0d35d8..b4beabb6fa94fe4ef66031f71ef923354c677f43 100644
--- a/pkg/analyzer_experimental/lib/src/generated/element.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/element.dart
@@ -5606,6 +5606,34 @@ class PropertyAccessorMember extends ExecutableMember implements PropertyAccesso
bool get isAbstract => baseElement.isAbstract;
bool get isGetter => baseElement.isGetter;
bool get isSetter => baseElement.isSetter;
+ String toString() {
+ PropertyAccessorElement baseElement = this.baseElement;
+ List<ParameterElement> parameters = this.parameters;
+ FunctionType type = this.type;
+ JavaStringBuilder builder = new JavaStringBuilder();
+ if (isGetter) {
+ builder.append("get ");
+ } else {
+ builder.append("set ");
+ }
+ builder.append(baseElement.enclosingElement.displayName);
+ builder.append(".");
+ builder.append(baseElement.displayName);
+ builder.append("(");
+ int parameterCount = parameters.length;
+ for (int i = 0; i < parameterCount; i++) {
+ if (i > 0) {
+ builder.append(", ");
+ }
+ builder.append(parameters[i]).toString();
+ }
+ builder.append(")");
+ if (type != null) {
+ builder.append(" -> ");
+ builder.append(type.returnType);
+ }
+ return builder.toString();
+ }
InterfaceType get definingType => super.definingType as InterfaceType;
}
/**
@@ -5908,6 +5936,7 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
}
return element.hashCode;
}
+ bool isAssignableTo(Type2 type) => this.isSubtypeOf(type);
bool isSubtypeOf(Type2 type) {
if (type == null) {
return false;
@@ -6705,17 +6734,17 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
} else if (typeS.isDartCoreFunction && elementT.getMethod("call") != null) {
return true;
}
- InterfaceType supertype = elementT.supertype;
+ InterfaceType supertype = superclass;
if (supertype != null && ((supertype as InterfaceTypeImpl)).isSubtypeOf2(typeS, visitedClasses)) {
return true;
}
- List<InterfaceType> interfaceTypes = elementT.interfaces;
+ List<InterfaceType> interfaceTypes = interfaces;
for (InterfaceType interfaceType in interfaceTypes) {
if (((interfaceType as InterfaceTypeImpl)).isSubtypeOf2(typeS, visitedClasses)) {
return true;
}
}
- List<InterfaceType> mixinTypes = elementT.mixins;
+ List<InterfaceType> mixinTypes = mixins;
for (InterfaceType mixinType in mixinTypes) {
if (((mixinType as InterfaceTypeImpl)).isSubtypeOf2(typeS, visitedClasses)) {
return true;
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/constant.dart ('k') | pkg/analyzer_experimental/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698