Skip to content

Commit ce99741

Browse files
committed
try the fix
1 parent 0fe964b commit ce99741

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Analysis/include/Luau/FragmentAutocomplete.h

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ struct FragmentAutocompleteResult
7575
{
7676
ModulePtr incrementalModule;
7777
Scope* freshScope;
78-
TypeArena arenaForAutocomplete;
7978
AutocompleteResult acResults;
8079
};
8180

Analysis/src/FragmentAutocomplete.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1658,21 +1658,21 @@ FragmentAutocompleteResult fragmentAutocomplete(
16581658
auto globalScope = (opts && opts->forAutocomplete) ? frontend.globalsForAutocomplete.globalScope.get() : frontend.globals.globalScope.get();
16591659
if (FFlag::DebugLogFragmentsFromAutocomplete)
16601660
logLuau("Fragment Autocomplete Source Script", src);
1661-
TypeArena arenaForFragmentAutocomplete;
1661+
unfreeze(tcResult.incrementalModule->internalTypes);
16621662
auto result = Luau::autocomplete_(
16631663
tcResult.incrementalModule,
16641664
frontend.builtinTypes,
1665-
&arenaForFragmentAutocomplete,
1665+
&tcResult.incrementalModule->internalTypes,
16661666
tcResult.ancestry,
16671667
globalScope,
16681668
tcResult.freshScope,
16691669
cursorPosition,
16701670
frontend.fileResolver,
16711671
callback
16721672
);
1673-
1673+
freeze(tcResult.incrementalModule->internalTypes);
16741674
reportWaypoint(reporter, FragmentAutocompleteWaypoint::AutocompleteEnd);
1675-
return {std::move(tcResult.incrementalModule), tcResult.freshScope.get(), std::move(arenaForFragmentAutocomplete), std::move(result)};
1675+
return {std::move(tcResult.incrementalModule), tcResult.freshScope.get(), std::move(result)};
16761676
}
16771677

16781678
} // namespace Luau

0 commit comments

Comments
 (0)