Skip to content

fix: use optional param instead of overload for loadfile - #1011

Merged
CppCXY merged 2 commits into
EmmyLuaLs:mainfrom
EfveZombie:fix.loadfile-optional-param
Apr 7, 2026
Merged

CppCXY merged 2 commits into
EmmyLuaLs:mainfrom
EfveZombie:fix.loadfile-optional-param

Conversation

@EfveZombie

Copy link
Copy Markdown

Replace overloaded signatures of loadfile with optional parameters, so that the param count checker works correctly.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Lua standard library definitions by removing redundant whitespace and marking the filename parameter as optional in the loadfile function. Feedback suggests further improving type safety by specifying more precise types for the mode and env parameters to ensure consistency with the load function.

Comment thread crates/emmylua_code_analysis/resources/std/global.lua Outdated
@CppCXY
CppCXY merged commit c552a38 into EmmyLuaLs:main Apr 7, 2026
16 checks passed
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.

2 participants