Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Analysis/src/FragmentAutocomplete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1658,21 +1658,22 @@ FragmentAutocompleteResult fragmentAutocomplete(
auto globalScope = (opts && opts->forAutocomplete) ? frontend.globalsForAutocomplete.globalScope.get() : frontend.globals.globalScope.get();
if (FFlag::DebugLogFragmentsFromAutocomplete)
logLuau("Fragment Autocomplete Source Script", src);
TypeArena arenaForFragmentAutocomplete;
unfreeze(tcResult.incrementalModule->internalTypes);
TypeArena arenaForAutocomplete;
auto result = Luau::autocomplete_(
tcResult.incrementalModule,
frontend.builtinTypes,
&arenaForFragmentAutocomplete,
&tcResult.incrementalModule->internalTypes,
tcResult.ancestry,
globalScope,
tcResult.freshScope,
cursorPosition,
frontend.fileResolver,
callback
);

freeze(tcResult.incrementalModule->internalTypes);
reportWaypoint(reporter, FragmentAutocompleteWaypoint::AutocompleteEnd);
return {std::move(tcResult.incrementalModule), tcResult.freshScope.get(), std::move(arenaForFragmentAutocomplete), std::move(result)};
return {std::move(tcResult.incrementalModule), tcResult.freshScope.get(), std::move(arenaForAutocomplete), std::move(result)};
}

} // namespace Luau
2 changes: 1 addition & 1 deletion tests/FragmentAutocomplete.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3410,7 +3410,6 @@ local foo = 8)");
CHECK(*pos == Position{2, 0});
}

#if 0
TEST_CASE_FIXTURE(FragmentAutocompleteBuiltinsFixture, "TypeCorrectLocalReturn_assert")
{
const std::string source = R"()";
Expand All @@ -3434,6 +3433,7 @@ return target(bar)";
);
}

#if 0
TEST_CASE_FIXTURE(FragmentAutocompleteBuiltinsFixture, "TypeCorrectLocalRank_assert")
{
const std::string source = R"()";
Expand Down