未验证 提交 0b5b8f0b 编写于 作者: F Florian Verdonck 提交者: GitHub

Remove generic types in CcuTypeForwarderTree. (#13144)

上级 ee45c476
......@@ -621,8 +621,8 @@ let ImportILAssemblyTypeForwarders (amap, m, exportedTypes: ILExportedTypesAndFo
(exportedType: ILExportedTypeOrForwarder)
(nets: ILNestedExportedTypes)
(enc: string list)
(tree: CcuTypeForwarderTree<string, Lazy<EntityRef>>)
: CcuTypeForwarderTree<string, Lazy<EntityRef>> =
(tree: CcuTypeForwarderTree)
: CcuTypeForwarderTree =
(tree, nets.AsList())
||> List.fold(fun tree net ->
let tcref = lazy ImportILTypeRefUncached (amap ()) m (ILTypeRef.Create(exportedType.ScopeRef, enc, net.Name))
......
......@@ -3,7 +3,6 @@
/// Functions to import .NET binary metadata as TAST objects
module internal FSharp.Compiler.Import
open System.Collections.Immutable
open Internal.Utilities.Library
open FSharp.Compiler.AbstractIL.IL
open FSharp.Compiler.TcGlobals
......
......@@ -5292,16 +5292,16 @@ type CcuData =
override x.ToString() = sprintf "CcuData(%A)" x.FileName
type CcuTypeForwarderTree<'TKey, 'TValue> =
type CcuTypeForwarderTree =
{
Value : 'TValue option
Children : ImmutableDictionary<'TKey, CcuTypeForwarderTree<'TKey, 'TValue>>
Value : Lazy<EntityRef> option
Children : ImmutableDictionary<string, CcuTypeForwarderTree>
}
static member Empty = { Value = None; Children = ImmutableDictionary.Empty }
module CcuTypeForwarderTable =
let rec findInTree (remainingPath: ArraySegment<string>) (finalKey : string) (tree:CcuTypeForwarderTree<string, Lazy<EntityRef>>): Lazy<EntityRef> option =
let rec findInTree (remainingPath: ArraySegment<string>) (finalKey : string) (tree:CcuTypeForwarderTree): Lazy<EntityRef> option =
let nodes = tree.Children
let searchTerm =
if remainingPath.Count = 0 then
......@@ -5319,10 +5319,10 @@ module CcuTypeForwarderTable =
/// Represents a table of .NET CLI type forwarders for an assembly
type CcuTypeForwarderTable =
{
Root : CcuTypeForwarderTree<string, Lazy<EntityRef>>
Root : CcuTypeForwarderTree
}
static member Empty : CcuTypeForwarderTable = { Root = CcuTypeForwarderTree<_,_>.Empty }
static member Empty : CcuTypeForwarderTable = { Root = CcuTypeForwarderTree.Empty }
member this.TryGetValue (path:string array) (item:string): Lazy<EntityRef> option =
CcuTypeForwarderTable.findInTree (ArraySegment path) item this.Root
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册