@@ -979,14 +979,14 @@ and /// Represents a type definition, exception definition, module definition or
979979 member x.FSharpObjectModelTypeInfo =
980980 match x.TypeReprInfo with
981981 | TFSharpObjectRepr x -> x
982- | _ -> assert false ; failwith " not an F# object model type definition"
982+ | _ -> failwith " not an F# object model type definition"
983983
984984 /// Indicate if this is a type definition backed by Abstract IL metadata.
985985 member x.IsILTycon = match x.TypeReprInfo with | TILObjectRepr _ -> true | _ -> false
986986
987987 /// Get the Abstract IL scope, nesting and metadata for this
988988 /// type definition, assuming it is backed by Abstract IL metadata.
989- member x.ILTyconInfo = match x.TypeReprInfo with | TILObjectRepr data -> data | _ -> assert false ; failwith " not a .NET type definition"
989+ member x.ILTyconInfo = match x.TypeReprInfo with | TILObjectRepr data -> data | _ -> failwith " not a .NET type definition"
990990
991991 /// Get the Abstract IL metadata for this type definition, assuming it is backed by Abstract IL metadata.
992992 member x.ILTyconRawMetadata = let ( TILObjectReprData ( _ , _ , td )) = x.ILTyconInfo in td
@@ -1386,7 +1386,7 @@ and
13861386
13871387 member info.BaseTypeForErased ( m , objTy ) =
13881388 if info.IsErased then info.LazyBaseType.Force ( m, objTy)
1389- else assert false ; failwith " expect erased type"
1389+ else failwith " expect erased type"
13901390
13911391 override x.ToString () = " TProvidedTypeInfo(...)"
13921392
@@ -1784,7 +1784,8 @@ and [<Sealed>] ModuleOrNamespaceType(kind: ModuleOrNamespaceKind, vals: QueueLis
17841784 member mtyp.AllValsAndMembersByPartialLinkageKey =
17851785 let addValByMangledName ( x : Val ) tab =
17861786 if x.IsCompiledAsTopLevel then
1787- MultiMap.add x.LinkagePartialKey x tab
1787+ let key = x.GetLinkagePartialKey()
1788+ MultiMap.add key x tab
17881789 else
17891790 tab
17901791 cacheOptRef allValsAndMembersByPartialLinkageKeyCache ( fun () ->
@@ -2458,18 +2459,18 @@ and [<StructuredFormatDisplay("{LogicalName}")>]
24582459 member x.IsCompiledAsTopLevel = x.ValReprInfo.IsSome
24592460
24602461 /// The partial information used to index the methods of all those in a ModuleOrNamespace.
2461- member x.LinkagePartialKey : ValLinkagePartialKey =
2462+ member x.GetLinkagePartialKey () : ValLinkagePartialKey =
24622463 assert x.IsCompiledAsTopLevel
24632464 { LogicalName = x.LogicalName
24642465 MemberParentMangledName = ( if x.IsMember then Some x.MemberApparentEntity.LogicalName else None)
24652466 MemberIsOverride = x.IsOverrideOrExplicitImpl
24662467 TotalArgCount = if x.IsMember then x.ValReprInfo.Value.TotalArgCount else 0 }
24672468
24682469 /// The full information used to identify a specific overloaded method amongst all those in a ModuleOrNamespace.
2469- member x.LinkageFullKey : ValLinkageFullKey =
2470+ member x.GetLinkageFullKey () : ValLinkageFullKey =
24702471 assert x.IsCompiledAsTopLevel
2471- ValLinkageFullKey ( x.LinkagePartialKey , ( if x.IsMember then Some x.Type else None ) )
2472-
2472+ let key = x.GetLinkagePartialKey ( )
2473+ ValLinkageFullKey ( key , ( if x.IsMember then Some x.Type else None ))
24732474
24742475 /// Is this a member definition or module definition?
24752476 member x.IsMemberOrModuleBinding = x.val_ flags.IsMemberOrModuleBinding
@@ -2653,7 +2654,7 @@ and [<StructuredFormatDisplay("{LogicalName}")>]
26532654 | Parent eref ->
26542655 match eref.PublicPath with
26552656 | None -> None
2656- | Some p -> Some( ValPubPath( p, x.LinkageFullKey ))
2657+ | Some p -> Some( ValPubPath( p, x.GetLinkageFullKey () ))
26572658 | ParentNone ->
26582659 None
26592660
@@ -4986,7 +4987,9 @@ let mkNonLocalCcuRootEntityRef ccu (x:Entity) = mkNonLocalTyconRefPreResolved x
49864987let mkNestedValRef ( cref : EntityRef ) ( v : Val ) : ValRef =
49874988 match cref with
49884989 | ERefLocal _ -> mkLocalValRef v
4989- | ERefNonLocal nlr -> mkNonLocalValRefPreResolved v nlr v.LinkageFullKey
4990+ | ERefNonLocal nlr ->
4991+ let key = v.GetLinkageFullKey()
4992+ mkNonLocalValRefPreResolved v nlr key
49904993
49914994/// From Ref_private to Ref_nonlocal when exporting data.
49924995let rescopePubPathToParent viewedCcu ( PubPath ( p )) = NonLocalEntityRef( viewedCcu, p.[ 0 .. p.Length-2 ])
0 commit comments