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

Unified Diff: pkg/compiler/lib/src/js_backend/no_such_method_registry.dart

Issue 1005873009: Fix check for throwing NSM implementations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | tests/compiler/dart2js/no_such_method_enabled_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
diff --git a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
index 96e609bb7f8d54113a50f4cda6dfcb7a30e7a01a..70a7936667e8107b4616390e1ce9b0275a20c86f 100644
--- a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
+++ b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
@@ -171,8 +171,9 @@ class NoSuchMethodRegistry {
} else if (body is Block &&
!body.statements.isEmpty &&
body.statements.nodes.tail.isEmpty) {
- if (body.statements.nodes.head is Throw) {
- return true;
+ if (body.statements.nodes.head is ExpressionStatement) {
+ ExpressionStatement stmt = body.statements.nodes.head;
+ return stmt.expression is Throw;
}
}
return false;
« no previous file with comments | « no previous file | tests/compiler/dart2js/no_such_method_enabled_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698