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

Unified Diff: lib/src/utils.dart

Issue 1142713004: fixes #184, type literals now use emitTypeName (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: another case 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 | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/expect/misc.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/utils.dart
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index ba0e0354a79b51e80256207403339ef1a8362e05..4c7339520c673f724b77c967c1d74164a4615bbe 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -375,9 +375,12 @@ Object getConstantField(
return (f == null || f.type != expectedType) ? null : f.value;
}
-ParameterizedType fillDynamicTypeArgs(ParameterizedType t, TypeProvider types) {
- var dyn = new List.filled(t.typeArguments.length, types.dynamicType);
- return t.substitute2(dyn, t.typeArguments);
+DartType fillDynamicTypeArgs(DartType t, TypeProvider types) {
+ if (t is ParameterizedType) {
+ var dyn = new List.filled(t.typeArguments.length, types.dynamicType);
+ return t.substitute2(dyn, t.typeArguments);
+ }
+ return t;
}
/// Similar to [SimpleIdentifier] inGetterContext, inSetterContext, and
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/expect/misc.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698