Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generating code for inaccessible constructor is unnecessary #2

Open
c3076802 opened this issue Oct 29, 2015 · 0 comments
Open

generating code for inaccessible constructor is unnecessary #2

c3076802 opened this issue Oct 29, 2015 · 0 comments

Comments

@c3076802
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant