Skip to content

I think it is a bug #9

@Freakwill

Description

@Freakwill

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions