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 ba65adf354cb69cffa88c9b4bcc8fb43bc2759e8..3ea5a2254ef071e5b2ba29821bdd2b99ba14b4ba 100644 |
| --- a/lib/src/compiler/code_generator.dart |
| +++ b/lib/src/compiler/code_generator.dart |
| @@ -3111,7 +3111,7 @@ class CodeGenerator extends GeneralizingAstVisitor |
| var args = _visit(argumentList) as List<JS.Expression>; |
| return isFactory ? new JS.Call(ctor, args) : new JS.New(ctor, args); |
| } |
| - if (_isObjectLiteral(element.enclosingElement)) { |
|
Jacob
2016/05/25 16:38:04
this was crashing on some google3 code.
|
| + if (element != null && _isObjectLiteral(element.enclosingElement)) { |
| return _emitObjectLiteral(argumentList); |
| } |
| if (isConst) return _emitConst(emitNew); |