Make all types support "!" so "if (!foo)" works reliably for all objects.

This commit is contained in:
Bob Nystrom
2015-01-15 21:50:01 -08:00
parent 94259fac8a
commit 64c2bd7633
10 changed files with 57 additions and 21 deletions
+1
View File
@@ -0,0 +1 @@
IO.print(null) // expect: null
+1
View File
@@ -0,0 +1 @@
IO.print(!null) // expect: true
+4
View File
@@ -0,0 +1,4 @@
IO.print(null is Null) // expect: true
IO.print(null is Object) // expect: true
IO.print(null is Bool) // expect: false
IO.print(null.type == Null) // expect: true