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

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

Issue 359413006: Fix handling of type literals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Split visitTypeReferenceSend 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/dart_backend/dart_codegen.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart
index 9db2de3f3fa30debaa545f731c1fe4dacb9e0332..6d52261a9d094c2bbd9f07d20891d6cb0c46b888 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart
@@ -630,8 +630,9 @@ class ConstantEmitter extends ConstExpVisitor<Expression> {
}
Expression visitType(TypeConstExp exp) {
- return new LiteralType(exp.element.name)
- ..element = exp.element;
+ DartType type = exp.type;
+ return new LiteralType(type.name)
+ ..type = type;
}
Expression visitVariable(VariableConstExp exp) {

Powered by Google App Engine
This is Rietveld 408576698