@@ -979,14 +979,14 @@ and /// Represents a type definition, exception definition, module definition or
979979member x.FSharpObjectModelTypeInfo =
980980match x.TypeReprInfowith
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.
985985member x.IsILTycon = match x.TypeReprInfowith | 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.TypeReprInfowith | TILObjectRepr data-> data| _ -> assert false ; failwith" not a .NET type definition"
989+ member x.ILTyconInfo = match x.TypeReprInfowith | 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.
992992member x.ILTyconRawMetadata = let ( TILObjectReprData ( _ , _ , td )) = x.ILTyconInfoin td
@@ -1386,7 +1386,7 @@ and
13861386
13871387member info.BaseTypeForErased ( m , objTy ) =
13881388if info.IsErasedthen info.LazyBaseType.Force( m, objTy)
1389- else assert false ; failwith" expect erased type"
1389+ else failwith" expect erased type"
13901390
13911391override x.ToString () = " TProvidedTypeInfo(...)"
13921392
@@ -1784,7 +1784,8 @@ and [<Sealed>] ModuleOrNamespaceType(kind: ModuleOrNamespaceKind, vals: QueueLis
17841784member mtyp.AllValsAndMembersByPartialLinkageKey =
17851785let addValByMangledName ( x : Val ) tab =
17861786if x.IsCompiledAsTopLevelthen
1787- MultiMap.add x.LinkagePartialKey x tab
1787+ let key = x.GetLinkagePartialKey()
1788+ MultiMap.add key x tab
17881789else
17891790 tab
17901791 cacheOptRef allValsAndMembersByPartialLinkageKeyCache( fun () ->
@@ -2458,18 +2459,18 @@ and [<StructuredFormatDisplay("{LogicalName}")>]
24582459member 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 =
24622463assert x.IsCompiledAsTopLevel
24632464{ LogicalName= x.LogicalName
24642465 MemberParentMangledName= ( if x.IsMemberthen Some x.MemberApparentEntity.LogicalNameelse None)
24652466 MemberIsOverride= x.IsOverrideOrExplicitImpl
24662467 TotalArgCount= if x.IsMemberthen x.ValReprInfo.Value.TotalArgCountelse 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 =
24702471assert 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?
24752476member x.IsMemberOrModuleBinding = x.val_ flags.IsMemberOrModuleBinding
@@ -2653,7 +2654,7 @@ and [<StructuredFormatDisplay("{LogicalName}")>]
26532654| Parent eref->
26542655match eref.PublicPathwith
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 =
49874988match crefwith
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 ])