Skip to content

nil doesn't seem to work properly. #104

@TurkeyMan

Description

@TurkeyMan

LuaObject initialises to L=null, r = LUA_REFNIL. Then there's code:

@property bool isNil() pure nothrow @safe
	{
		return r == LUA_REFNIL;
	}

It looks like a nil object is treated as a lua nil... which makes sense to me... but then you try and copy it:

LuaObject x = LuaObject();
LuaObject y = x;

Crash, because L == null, and the function tries to push the value. Should there be a check in the postblit that inhibits this behaviour if the object is nil?

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