Last active
August 29, 2015 14:11
-
-
Save greymeister/62bb7fe72c8d4d3d884e to your computer and use it in GitHub Desktop.
Some Groovy Semantics I don't quite get
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blah = [name: 'poop', status: 'tudus', null: 'EAD'] | |
foo = 'name' | |
bar = 'status' | |
baz = null | |
println blah[baz] | |
blah.put(null, 'NOOBER') | |
println blah[foo] | |
println blah[bar] | |
println blah[baz] |
Ah, that is interesting, I also didn't see a way to explicitly force null using the map syntax.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems the null in your first assignment is converted to the string 'null', rather than an actual null.