LuaLS / LuaLS/lua-language-server
Class are both the correct class type and undefined
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
### How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
### Which OS are you using?
Linux
### What is the issue affecting?
Type Checking
### Expected Behaviour
`IPv4Router` should be a kind of `Object`.
### Actual Behaviour

### Reproduction steps
1. Clone https://github.com/AR2000AR/openComputers_codes
2. Install the definitions https://github.com/AR2000AR/opencomputers-openos-definitions to reduce the number of errors. Wireshark related files errors can be ignored (since there is not complete definitions for Wireshark available yet)
3. Open [`network/lib/network/ipv4/IPv4Layer.lua:108`](https://github.com/AR2000AR/openComputers_codes/blob/840dbac82981aeddb7969502c63a32b4125f5ade/network/lib/network/ipv4/IPv4Layer.lua#L108)
### Additional Notes
312 errors with 3.7.4
9 errors with 3.6.21
### Log File
3.7.4 [file_home_ar2000_Documents_Programmation_Lua_openComputers_codes.worktrees_lls-rework.log](https://github.com/LuaLS/lua-language-server/files/14271928/file_home_ar2000_Documents_Programmation_Lua_openComputers_codes.worktrees_lls-rework.log)
3.6.21 [file_home_ar2000_Documents_Programmation_Lua_openComputers_codes.worktrees_lls-rework.log](https://github.com/LuaLS/lua-language-server/files/14271932/file_home_ar2000_Documents_Programmation_Lua_openComputers_codes.worktrees_lls-rework.log)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report using the openComputers_codes repository, its opencomputers-openos-definitions, and network/lib/network/ipv4/IPv4Layer.lua:108. Compare the diagnostics and logs from versions 3.7.4 and 3.6.21, then trace the type-checking behavior responsible for IPv4Router being both a class and undefined. Done means the reproduction no longer produces the reported incorrect diagnostics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100