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

Unified Diff: lib/src/js/nodes.dart

Issue 974703003: fix dummy setters -- grammar requires an identifier (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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/_isolate_helper/_isolate_helper.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/js/nodes.dart
diff --git a/lib/src/js/nodes.dart b/lib/src/js/nodes.dart
index 6b574039a77dcffb1589a2f557fb18cb054ec280..394ec7689254bd9ae99e836356c25424790a3341 100644
--- a/lib/src/js/nodes.dart
+++ b/lib/src/js/nodes.dart
@@ -1201,7 +1201,10 @@ class Method extends Property {
Method(Expression name, Fun function,
{this.isGetter: false, this.isSetter: false, this.isStatic: false})
- : super(name, function);
+ : super(name, function) {
+ assert(!isGetter || function.params.length == 0);
+ assert(!isSetter || function.params.length == 1);
+ }
Fun get function => super.value;
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/expect/_isolate_helper/_isolate_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698