Allow empty blocks.

This commit is contained in:
Bob Nystrom
2013-12-29 10:46:21 -08:00
parent a9323376ec
commit c8fe27d6c4
5 changed files with 19 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
{} // By itself.
// In a statement.
if (true) {}
if (false) {} else {}
IO.write("ok") // expect: ok
+2
View File
@@ -0,0 +1,2 @@
var f = fn {}
IO.write(f.call) // expect: null
+5
View File
@@ -0,0 +1,5 @@
class Foo {
bar {}
}
IO.write((new Foo).bar) // expect: null