uLua
uLua copied to clipboard
generating code for inaccessible constructor is unnecessary
Say we have a class call AppConfigMgr has a private constructor only, ulua will export some unnecessary code
public class AppConfigMgr {
private AppConfigMgr()
{
}
new LuaMethod("New", _CreateConfigs_AppConfigMgr),
static int _CreateConfigs_AppConfigMgr(IntPtr L)
{
LuaDLL.luaL_error(L, "Configs.AppConfigMgr class does not have a constructor function");
return 0;
}
Don't generate New when the constructor is inaccessible, Let lua handle the error when miss use.
Thank you