Skip to content

Conversation

@checkraisefold
Copy link
Contributor

@checkraisefold checkraisefold commented Nov 29, 2025

After release 0.701, including the merging of #1980, I noticed an issue where functions called with the turbofish as their only call were linted as unused.

Upon further investigation, I discovered 2 things:

  1. Debugging was hampered by the lack of an implementation in AstJsonEncoder which made luau-ast spit out a nonsensical AST
  2. The inner expr, that being the function being instantiated upon, was never being visited, seemingly due to an oversight

This PR fixes both issues. The only thing I'm unsure of is if it's proper to do the LUAU_ASSERT I added in AstJsonEncoder. The assertion will fail if you have the flag that allows for generating it in the AST on, but have this specific flag off, and then attempt to generate the encoded JSON for it. Maybe it should just return false instead of failing an assertion?

Closes #2113

@checkraisefold
Copy link
Contributor Author

conflict resolved

@checkraisefold
Copy link
Contributor Author

review resolved

@checkraisefold
Copy link
Contributor Author

i have the distinct feeling the test failure is not caused by this pr

@alexmccord
Copy link
Contributor

alexmccord commented Jan 5, 2026

Yeah, definitely unrelated. You could try bumping the time limit to 0.3s. Unfortunate case of slow CPUs vs wall clock.

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.

Functions called with an explicit type instantiation as their only use are falsely linted as unused

3 participants