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

add infer function param type #2532

Merged
merged 6 commits into from Feb 26, 2024

Conversation

fesily
Copy link
Contributor

@fesily fesily commented Feb 21, 2024

  1. add config Lua.type.inferParamType
  2. infer by all function refs
  3. vm.getVisibleType fix package
  4. fix all tests
  5. fix most warning

@fesily
Copy link
Contributor Author

fesily commented Feb 21, 2024

剩下6个警告,
image
我没法找到这几个属性的写入处,难道是多余的吗

@sumneko
Copy link
Collaborator

sumneko commented Feb 23, 2024

dotcolonparser/compile.lua 里,但是没有去class里定义,去 parser/guide.lua 里加一下定义吧。
typeGeneric 我也没搜到,但我印象里以前有用过,现在没用的话就删掉吧。

@fesily
Copy link
Contributor Author

fesily commented Feb 23, 2024

ok,改了

script/vm/compiler.lua Outdated Show resolved Hide resolved
locale/en-us/setting.lua Outdated Show resolved Hide resolved
fesily and others added 2 commits February 23, 2024 18:17
Co-authored-by: Lewis Russell <me@lewisr.dev>
Co-authored-by: Lewis Russell <me@lewisr.dev>
@sumneko
Copy link
Collaborator

sumneko commented Feb 26, 2024

这个设置应该默认使用 false 吧,应该还是会有类型收窄问题

@fesily
Copy link
Contributor Author

fesily commented Feb 26, 2024

这个设置应该默认使用 false 吧,应该还是会有类型收窄问题

@sumneko sumneko merged commit 73be83c into LuaLS:master Feb 26, 2024
1 of 10 checks passed
@fesily
Copy link
Contributor Author

fesily commented Feb 26, 2024

应该还需要修改一下测试单元,默认不开启的话,测试过不了,我补一个

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

Successfully merging this pull request may close these issues.

None yet

3 participants