Chromium Code Reviews| Index: lib/src/compiler/code_generator.dart |
| diff --git a/lib/src/compiler/code_generator.dart b/lib/src/compiler/code_generator.dart |
| index 95dba1cdabaa92703a3e0c6a11ea8fa81638d0fa..01751f37aaa30487ca1b2ae26d44665b6bec423d 100644 |
| --- a/lib/src/compiler/code_generator.dart |
| +++ b/lib/src/compiler/code_generator.dart |
| @@ -519,8 +519,12 @@ class CodeGenerator extends GeneralizingAstVisitor |
| @override |
| JS.Expression visitTypeName(TypeName node) { |
| - // TODO(jmesserly): should only happen for erroneous code. |
| - if (node.type == null) return js.call('dart.dynamic'); |
| + if (node.type == null) { |
| + // TODO(jmesserly): if the type fails to resolve, should we generate code |
| + // that throws instead? |
| + assert(options.unsafeForceCompile); |
| + return js.call('dart.dynamic'); |
|
vsm
2016/05/11 17:26:07
Throw sounds better to me. Do we need this to run
Jennifer Messerly
2016/05/11 17:52:32
yeah i filed https://github.com/dart-lang/dev_comp
|
| + } |
| return _emitType(node.type); |
| } |
| @@ -2560,8 +2564,6 @@ class CodeGenerator extends GeneralizingAstVisitor |
| } else if (typeArgs != null) { |
| // Dynamic calls may have type arguments, even though the function types |
| // are not known. |
| - // TODO(jmesserly): seems to be mostly broken in Analyzer at the moment: |
| - // https://github.com/dart-lang/sdk/issues/26368 |
| return typeArgs.arguments.map(visitTypeName).toList(growable: false); |
| } |
| return null; |