LuaD icon indicating copy to clipboard operation
LuaD copied to clipboard

Struct binding with empty constructor fail

Open SrMordred opened this issue 8 years ago • 0 comments

Minimal example (without the imports)

class MyClass{
    this(){  }
};
struct MyStruct{
};
void main(){
    auto lua = new LuaState;
    lua.openLibs();
    lua["MyClass"]  = lua.registerType!MyClass();
    lua["MyStruct"] = lua.registerType!MyStruct();
    lua.doString("local x  = MyClass();"); //work
    lua.doString("local y  = MyStruct();"); //fail
}

SrMordred avatar Apr 06 '16 14:04 SrMordred