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

Unified Diff: sdk/lib/_internal/compiler/implementation/ir/const_expression.dart

Issue 355373002: dart2dart: Fixed treatment of dynamic type literals in new IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Pass DartType to LiteralType Created 6 years, 6 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/ir/const_expression.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ir/const_expression.dart b/sdk/lib/_internal/compiler/implementation/ir/const_expression.dart
index b375517d02f7cab8e2a5ef6d9b356fc749423b5d..f451e0f785f6d1322702e4fcc0c622940340328b 100644
--- a/sdk/lib/_internal/compiler/implementation/ir/const_expression.dart
+++ b/sdk/lib/_internal/compiler/implementation/ir/const_expression.dart
@@ -90,9 +90,12 @@ class SymbolConstExp extends ConstExp {
/// Type literal.
class TypeConstExp extends ConstExp {
- final TypeDeclarationElement element;
+ /// Either [DynamicType] or a raw [GenericType].
+ final DartType type;
- TypeConstExp(this.element);
+ TypeConstExp(this.type) {
+ assert(type is GenericType || type is DynamicType);
+ }
accept(ConstExpVisitor visitor) => visitor.visitType(this);
}

Powered by Google App Engine
This is Rietveld 408576698