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

Unified Diff: lib/src/compiler/code_generator.dart

Issue 2011973002: Add generic types to Sort and Comparable. Fix crasher bug in codegen. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: removed change to Comparable.compare Created 4 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/runtime/dart_sdk.js ('k') | tool/input_sdk/lib/internal/sort.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
+ if (element != null && _isObjectLiteral(element.enclosingElement)) {
return _emitObjectLiteral(argumentList);
}
if (isConst) return _emitConst(emitNew);
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | tool/input_sdk/lib/internal/sort.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698