Logical "||" operator.

This commit is contained in:
Bob Nystrom
2013-11-19 18:24:58 -08:00
parent 4266facfda
commit fe48113054
7 changed files with 96 additions and 2 deletions
+5
View File
@@ -44,3 +44,8 @@ if (true) class Foo {} // no error
// Definition in else arm.
if (false) null else var a = io.write("ok") // expect: ok
if (true) null else class Foo {} // no error
// Only false is falsy.
if (0) io.write(0) // expect: 0
if (null) io.write(null) // expect: null
if ("") io.write("empty") // expect: empty