Skip to content

Commit

Permalink
review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
checkraisefold committed Oct 27, 2024
1 parent 12275bc commit 5f3aa97
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/operations/Completion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,19 +375,9 @@ std::optional<std::string> WorkspaceFolder::getDocumentationForAutocompleteEntry
// parentTy might be an intersected type, find the actual base ttv
auto followedTy = Luau::follow(*parentTy);
if (auto propInformation = lookupProp(followedTy, name))
definitionModuleName = Luau::getDefinitionModuleName(propInformation->first);
definitionModuleName = lookupTypeDefinitionModule(propInformation->first);
else
definitionModuleName = Luau::getDefinitionModuleName(followedTy);

// TODO: Dirty hack for invalid definitionModuleName on type aliases for solver v2!
// Remove after https://github.com/luau-lang/luau/issues/1441 is closed!
if (FFlag::LuauSolverV2 && !definitionModuleName)
{
if (followedTy->owningArena && followedTy->owningArena->owningModule)
{
definitionModuleName = followedTy->owningArena->owningModule->name;
}
}
definitionModuleName = lookupTypeDefinitionModule(followedTy);
}
}
}
Expand Down

0 comments on commit 5f3aa97

Please sign in to comment.