Skip to content

Commit 196cde6

Browse files
committed
Keep type args in mfv.ApparentEnclosingEntity
1 parent fcf61bc commit 196cde6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Compiler/Symbols/Symbols.fs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,11 +1708,15 @@ type FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
17081708
| Parent p -> FSharpEntity(cenv, p) |> Some
17091709

17101710
member _.ApparentEnclosingEntity: FSharpEntity =
1711+
let createEntity (ttype: TType) =
1712+
let tcref, tyargs = destAppTy cenv.g ttype
1713+
FSharpEntity(cenv, tcref, tyargs)
1714+
17111715
checkIsResolved()
17121716
match d with
1713-
| E e -> FSharpEntity(cenv, e.ApparentEnclosingTyconRef)
1714-
| P p -> FSharpEntity(cenv, p.ApparentEnclosingTyconRef)
1715-
| M m | C m -> FSharpEntity(cenv, m.ApparentEnclosingTyconRef)
1717+
| E e -> createEntity e.ApparentEnclosingType
1718+
| P p -> createEntity p.ApparentEnclosingType
1719+
| M m | C m -> createEntity m.ApparentEnclosingType
17161720
| V v ->
17171721
match v.ApparentEnclosingEntity with
17181722
| ParentNone -> invalidOp "the value or member doesn't have a logical parent"

0 commit comments

Comments
 (0)