slua icon indicating copy to clipboard operation
slua copied to clipboard

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

Open wlgys8 opened this issue 5 years ago • 0 comments

问题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,且拥有一个有参数构造函数时,不会自动导出无参数构造函数

wlgys8 avatar Dec 24 '19 08:12 wlgys8