Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,17 @@ private static bool TryGetSelectionContext(
[NotNullWhen(true)] out Selection? selection,
[NotNullWhen(true)] out IType? type)
{
// Fast path: a direct-field target carries its own selection on the
// preceding property row. Reading that selection once lets us derive
// the type from it, avoiding a second metadb read via the Type getter.
selection = target.Selection;

if (selection is not null)
{
type = selection.Type;
return true;
}

type = target.Type;

if (type is null)
Expand Down
Loading