Created
September 17, 2022 08:46
-
-
Save Shilo/8a2abf060f962d6ce3a9a134822e537f to your computer and use it in GitHub Desktop.
Nothing to nil casting test in LUA.
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
function testNil() return nil end | |
function testNothing() end | |
print( type( (testNil()) ) ) | |
print( type( (testNothing()) ) ) | |
print( type( testNil() ) ) | |
print( type( testNothing() ) ) |
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
nil | |
nil | |
nil | |
/opt/wandbox/lua-5.4.3/bin/lua: prog.lua:7: bad argument #1 to 'type' (value expected) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment