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

有多个构造函数的Struct类型导出有BUG #294

Open
wlgys8 opened this issue Dec 24, 2019 · 0 comments
Open

有多个构造函数的Struct类型导出有BUG #294

wlgys8 opened this issue Dec 24, 2019 · 0 comments

Comments

@wlgys8
Copy link
Contributor

wlgys8 commented Dec 24, 2019

问题1.
当类型为ValueType,且拥有多个构造函数时,导出的无参数构造函数存在BUG

LuaCodeGen第1989行

                    Write(file, "{0}(argc=={1}){{", first ? "if" : "else if", 0);

应当改为

                    Write(file, "{0}(argc=={1}){{", first ? "if" : "else if", 1);

问题2.
当类型为ValueType,且拥有一个有参数构造函数时,不会自动导出无参数构造函数

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