Fix crash with the index type function, where it would stack overflow due to not waiting for a pending-expansion #1407
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for #1406
While it is good to let
index
wait for the pending-expansion. To re-produce the issue you need more than just this code: https://i.imgur.com/b3OmUGF.pngIt needs this, else it won't crash.
But regarding "pending things", I'd recommend generalized functions for sanity checks like these, since there will be more cases of similar issues I believe. But I am 100% sure that eventually this issue here can maybe be prevented if looking at the Constraints. (And optimization) Not sure if
index
needs the table fully completed, or if it is preferred that the info is available based on how much info is available at the current position in the code.But if this gets done, I hope that they'll be connected to the Solver Logger, because I actually refined mine with colors and more info (yet need to finish that) to understand the Luau Source Code more and to debug issues.