luau/Analysis/src
karl-police f2488bdfa4
Fix crash with the index type function, where it would stack overflow due to not waiting for a pending-expansion (#1407)
Fix for https://github.com/luau-lang/luau/issues/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>
2024-09-13 10:16:30 -07:00
..
Anyification.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
AnyTypeSummary.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
ApplyTypeFunction.cpp Sync to upstream/release/582 (#960) 2023-06-23 23:19:39 -07:00
AstJsonEncoder.cpp Sync to upstream/release/639 (#1368) 2024-08-16 11:29:33 -07:00
AstQuery.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
Autocomplete.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
BuiltinDefinitions.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
Clone.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
Constraint.cpp Sync to upstream/release/630 (#1295) 2024-06-14 13:21:20 -07:00
ConstraintGenerator.cpp Sync to upstream/release/640 (#1374) 2024-08-23 09:35:30 -07:00
ConstraintSolver.cpp Sync to upstream/release/639 (#1368) 2024-08-16 11:29:33 -07:00
DataFlowGraph.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
DcrLogger.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
Def.cpp Sync to upstream/release/619 (#1218) 2024-03-30 16:14:44 -07:00
Differ.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
EmbeddedBuiltinDefinitions.cpp Sync to upstream/release/636 (#1346) 2024-07-26 10:47:49 -07:00
Error.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
Frontend.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
Generalization.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
GlobalTypes.cpp Sync to upstream/release/609 (#1150) 2024-01-19 10:04:46 -08:00
Instantiation2.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
Instantiation.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
IostreamHelpers.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
JsonEmitter.cpp Sync to upstream/release/543 (#657) 2022-09-01 16:14:03 -07:00
Linter.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
LValue.cpp Sync to upstream/release/527 (#491) 2022-05-19 17:02:24 -07:00
Module.cpp Sync to upstream/release/642 (#1385) 2024-09-06 13:34:50 -07:00
NonStrictTypeChecker.cpp Sync to upstream/release/640 (#1374) 2024-08-23 09:35:30 -07:00
Normalize.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
OverloadResolution.cpp Sync to upstream/release/640 (#1374) 2024-08-23 09:35:30 -07:00
Quantify.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
Refinement.cpp Sync to upstream/release/600 (#1076) 2023-10-20 18:10:30 -07:00
RequireTracer.cpp Sync to upstream/release/532 (#545) 2022-06-16 18:05:14 -07:00
Scope.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
Simplify.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
Substitution.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
Subtyping.cpp Sync to upstream/release/640 (#1374) 2024-08-23 09:35:30 -07:00
Symbol.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
TableLiteralInference.cpp Sync to upstream/release/639 (#1368) 2024-08-16 11:29:33 -07:00
ToDot.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
TopoSortStatements.cpp Sync to upstream/release/555 (#768) 2022-12-02 10:09:59 -08:00
ToString.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
Transpiler.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
TxnLog.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
Type.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
TypeArena.cpp Sync to upstream/release/635 (#1337) 2024-07-19 11:20:47 -07:00
TypeAttach.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
TypeChecker2.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
TypedAllocator.cpp Rename Windows.h to windows.h (#1055) 2023-10-03 06:59:44 -07:00
TypeFunction.cpp Fix crash with the index type function, where it would stack overflow due to not waiting for a pending-expansion (#1407) 2024-09-13 10:16:30 -07:00
TypeFunctionReductionGuesser.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
TypeInfer.cpp Sync to upstream/release/640 (#1374) 2024-08-23 09:35:30 -07:00
TypeOrPack.cpp Sync to upstream/release/600 (#1076) 2023-10-20 18:10:30 -07:00
TypePack.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
TypePath.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
TypeUtils.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00
Unifiable.cpp Sync to upstream/release/571 (#895) 2023-04-07 14:01:29 -07:00
Unifier2.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
Unifier.cpp Sync to upstream/release/641 (#1382) 2024-08-30 13:16:51 -07:00