Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed find all references on properties #10836

Merged
merged 1 commit into from
Jan 5, 2021
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
18 changes: 15 additions & 3 deletions src/fsharp/service/ItemKey.fs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,16 @@ and [<Sealed>] ItemKeyStoreBuilder() =

match item with
| Item.Value vref ->
writeValRef vref
if vref.IsPropertyGetterMethod || vref.IsPropertySetterMethod then
writeString ItemKeyTags.itemProperty
writeString vref.PropertyName
match vref.DeclaringEntity with
| ParentRef.Parent parent ->
writeEntityRef parent
| _ ->
()
else
writeValRef vref

| Item.UnionCase(info, _) ->
writeString ItemKeyTags.typeUnionCase
Expand Down Expand Up @@ -352,8 +361,11 @@ and [<Sealed>] ItemKeyStoreBuilder() =
| Item.Property(nm, infos) ->
writeString ItemKeyTags.itemProperty
writeString nm
infos
|> List.iter (fun info -> writeEntityRef info.DeclaringTyconRef)
match infos |> List.tryHead with
| Some info ->
writeEntityRef info.DeclaringTyconRef
| _ ->
()

| Item.TypeVar(_, typar) ->
writeTypar true typar
Expand Down