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

Passing a locally-bound format string to string.format produces an incorrect error #1577

Open
imnerolin opened this issue Dec 19, 2024 · 0 comments
Labels
bug Something isn't working new solver This issue is specific to the new solver.

Comments

@imnerolin
Copy link

--!strict
local key = "Hello, %s!"
local fmt = key:format("world") 
local fmt = string.format(key, "world")
-- both: Type Error - Function string.format expects 1 argument but 0 are specified
@imnerolin imnerolin added the bug Something isn't working label Dec 19, 2024
@aatxe aatxe added the new solver This issue is specific to the new solver. label Dec 19, 2024
@aatxe aatxe changed the title [NEW SOLVER] passing a string nonliteral to string.format in --!strict mode falsely throws a type error for "zero arguments provided" Passing a locally-bound format string to string.format produces an incorrect error Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new solver This issue is specific to the new solver.
Development

No branches or pull requests

2 participants