Chromium Code Reviews| Index: lib/src/js/nodes.dart |
| diff --git a/lib/src/js/nodes.dart b/lib/src/js/nodes.dart |
| index 9e2553fb9215fcaf3604764828d77e0458b70859..47c1155a4b7123c10c0ed6032aafa70752e8f1e3 100644 |
| --- a/lib/src/js/nodes.dart |
| +++ b/lib/src/js/nodes.dart |
| @@ -275,7 +275,8 @@ class If extends Statement { |
| final Node then; |
| final Node otherwise; |
| - If(this.condition, this.then, this.otherwise); |
| + If(this.condition, this.then, Node otherwise) : |
|
Jacob
2015/03/27 17:04:30
We could alternately make this constructor assert
Jennifer Messerly
2015/03/27 17:15:54
Agreed. Another option would be to just have null
|
| + otherwise = otherwise != null ? otherwise : new EmptyStatement(); |
| If.noElse(this.condition, this.then) : this.otherwise = new EmptyStatement(); |
| bool get hasElse => otherwise is !EmptyStatement; |