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

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

Issue 111283006: Revert "Compute correct constructor type for synthesized mixin constructors." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 12 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/members.dart
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index 455a091c9adfe2ecb3ce86d7579fc0b6a0fa4ed9..a3968894e7a9770e2357a4040527eb84e771c8ad 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -645,7 +645,8 @@ class ResolverTask extends CompilerTask {
InterfaceType factoryType =
treeElements.getType(redirectionNode.expression);
- targetType = targetType.substByContext(factoryType);
+ targetType = targetType.subst(factoryType.typeArguments,
+ factoryType.element.typeVariables);
factory.redirectionTarget = target;
factory.redirectionTargetType = targetType;
}
@@ -2737,7 +2738,7 @@ class ResolverVisitor extends MappingVisitor<Element> {
} else if (target.modifiers.isFinal() ||
target.modifiers.isConst() ||
(target.isFunction() &&
- Elements.isStaticOrTopLevelFunction(target) &&
+ Elements.isStaticOrTopLevelFunction(target) &&
!target.isSetter())) {
if (target.isFunction()) {
setter = warnAndCreateErroneousElement(
@@ -4165,14 +4166,17 @@ class ClassResolverVisitor extends TypeDefinitionVisitor {
*/
void addAllSupertypes(OrderedTypeSetBuilder allSupertypes,
InterfaceType type) {
+ Link<DartType> typeArguments = type.typeArguments;
ClassElement classElement = type.element;
+ Link<DartType> typeVariables = classElement.typeVariables;
Link<DartType> supertypes = classElement.allSupertypes;
assert(invariant(element, supertypes != null,
message: "Supertypes not computed on $classElement "
"during resolution of $element"));
while (!supertypes.isEmpty) {
DartType supertype = supertypes.head;
- allSupertypes.add(compiler, supertype.substByContext(type));
+ allSupertypes.add(compiler,
+ supertype.subst(typeArguments, typeVariables));
supertypes = supertypes.tail;
}
}

Powered by Google App Engine
This is Rietveld 408576698