-
Notifications
You must be signed in to change notification settings - Fork 373
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
(Fix available in PR) index doesn't wait for pending expansion, luau-analyze crashes on this code from the Forums, stack overflow #1406
Comments
I found a fix for this, I believe. |
Fix is here: #1407 |
This fix prevents the crash but there's still this: However, I think that's the code's fault because the purpose was to cause a crash, and not to fix the type error caused by the modification of non-sense, just to crash.
Here is a proof that it parsed I guess: |
… due to not waiting for a pending-expansion (#1407) 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.png It needs this, else it won't crash. ```lua local function ProblemCauser(key: Keys, value) PlayerData[key] = value end ``` 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. --------- Co-authored-by: aaron <aweiss@hey.com>
This post talks about a crash https://devforum.roblox.com/t/new-type-solver-beta/3155804/43
type Keys = index<typeof(PlayerData), keyof<typeof(PlayerData)>>
Full Code is this one:
The text was updated successfully, but these errors were encountered: