Let's see the following code. whenever a variable is nil, it will be a function if import sh.
require('sh')
print(type(x), type(nil)) -- function, nil
x = nil
print(type(x)) -- function, but x is set to be nil
t = {}
x = 'hello'
z = t[x]
print(type(t[x]), type(z)) -- nil, function, but z should be nil as usual.
I forgive the first one, since x may be set to be a function by sh, but how to explain next two?
Let's see the following code. whenever a variable is nil, it will be a function if import
sh.I forgive the first one, since x may be set to be a function by
sh, but how to explain next two?