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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart

Issue 14907008: Remove support for interface in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 7 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/dart_backend/placeholder_collector.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
index 601d1367c2aca5adf12c37df8fe9c497d908382c..e5ecbf3eaf9fa1285896e8d7e5d34e3e4139057f 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
@@ -572,14 +572,6 @@ class PlaceholderCollector extends Visitor {
ClassElement classElement = currentElement;
makeElementPlaceholder(node.name, classElement);
node.visitChildren(this);
- if (node.defaultClause != null) {
- // Can't just visit class node's default clause because of the bug in the
- // resolver, it just crashes when it meets type variable.
- DartType defaultType = classElement.defaultClass;
- assert(defaultType != null);
- makeTypePlaceholder(node.defaultClause.typeName, defaultType);
- visit(node.defaultClause.typeArguments);
- }
}
visitNamedMixinApplication(NamedMixinApplication node) {
@@ -590,15 +582,6 @@ class PlaceholderCollector extends Visitor {
bool tryResolveAndCollectTypeVariable(
TypeDeclarationElement typeDeclaration, Identifier name) {
- // Hack for case when interface and default class are in different
- // libraries, try to resolve type variable to default class type arg.
- // Example:
- // lib1: interface I<K> default C<K> {...}
- // lib2: class C<K> {...}
- if (typeDeclaration is ClassElement
- && (typeDeclaration as ClassElement).defaultClass != null) {
- typeDeclaration = (typeDeclaration as ClassElement).defaultClass.element;
- }
// Another poor man type resolution.
// Find this variable in enclosing type declaration parameters.
for (DartType type in typeDeclaration.typeVariables) {

Powered by Google App Engine
This is Rietveld 408576698