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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart

Issue 11413219: Canonicalize raw type (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment Created 8 years, 1 month 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/js_backend/runtime_types.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart b/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
index 2064f0948462af1fcc7431bdc93b563a37ed24da..a4545e6e26259dd8e7aed34f008848a22bb26a45 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
@@ -23,11 +23,10 @@ class RuntimeTypeInformation {
InterfaceType interface = t;
ClassElement element = t.element;
if (element.typeVariables.isEmpty) return;
- bool isRaw = interface.typeArguments.isEmpty;
+ bool isRaw = interface.isRaw;
if (isRaw && !expandRawType) return;
builder.add('<');
- Iterable items =
- isRaw ? element.typeVariables : interface.typeArguments;
+ Iterable items = interface.typeArguments;
var stringify = isRaw ? (_) => 'dynamic' : (type) => type.toString();
bool first = true;
for (var item in items) {
@@ -49,7 +48,7 @@ class RuntimeTypeInformation {
static bool hasTypeArguments(DartType type) {
if (type is InterfaceType) {
InterfaceType interfaceType = type;
- return !interfaceType.typeArguments.isEmpty;
+ return !interfaceType.isRaw;
}
return false;
}

Powered by Google App Engine
This is Rietveld 408576698