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

Unified Diff: lib/src/codegen/js_codegen.dart

Issue 1142713004: fixes #184, type literals now use emitTypeName (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | test/codegen/expect/misc.js » ('j') | test/codegen/expect/misc.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/js_codegen.dart
diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
index 8af06b9dfb02481a6e62f779bc649adf98c9852c..8f4abf85b25f22929cf12780fca0185239235b0c 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -991,6 +991,11 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
var name = element.name;
+ // type literal
+ if (element is ClassElement || element is FunctionTypeAliasElement) {
+ return _emitTypeName(fillDynamicTypeArgs(element.type, types));
+ }
+
// library member
if (element.enclosingElement is CompilationUnitElement) {
return _maybeQualifiedName(
« no previous file with comments | « no previous file | test/codegen/expect/misc.js » ('j') | test/codegen/expect/misc.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698