Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
auduchinok committed Dec 26, 2023
1 parent 58a6e03 commit e1679c4
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/Compiler/Checking/NameResolution.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3162,10 +3162,8 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified

match tyconSearch () with
| Result((resInfo, tcref) :: _) ->
let inst = FreshenTypeInst ncenv.g m (tcref.Typars m)
let _, _, tTypes = inst
let tType = TType_app(tcref, tTypes, ncenv.g.knownWithoutNull)
let item = Item.Types(id.idText, [ tType ])
let _, _, tyargs = FreshenTypeInst ncenv.g m (tcref.Typars m)
let item = Item.Types(id.idText, [TType_app(tcref, tyargs, ncenv.g.knownWithoutNull)])
success (resInfo, item)
| _ ->

Expand Down Expand Up @@ -3530,11 +3528,11 @@ let ResolveTypeLongIdentInTyconRef sink (ncenv: NameResolver) nenv typeNameResIn
ForceRaise (ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad ResolutionInfo.Empty PermitDirectReferenceToGeneratedType.No 0 m tcref id rest)
ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.Use, ad, resInfo, ResultTyparChecker(fun () -> true))

let _, tinst, args = FreshenTypeInst ncenv.g m (tcref.Typars m)
let ttype = TType_app(tcref, args, ncenv.g.knownWithoutNull)
let item = Item.Types(tcref.DisplayName, [ttype])
let _, tinst, tyargs = FreshenTypeInst ncenv.g m (tcref.Typars m)
let item = Item.Types(tcref.DisplayName, [TType_app(tcref, tyargs, ncenv.g.knownWithoutNull)])
CallNameResolutionSink sink (rangeOfLid lid, nenv, item, tinst, ItemOccurence.UseInType, ad)
tcref, args

tcref, tyargs

/// Create an UndefinedName error with details
let SuggestTypeLongIdentInModuleOrNamespace depth (modref: ModuleOrNamespaceRef) amap ad m (id: Ident) =
Expand Down Expand Up @@ -3692,12 +3690,12 @@ let ResolveTypeLongIdentAux sink (ncenv: NameResolver) occurence fullyQualified
match res with
| Result (resInfo, tcref) ->
ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.UseInType, ad, resInfo, ResultTyparChecker(fun () -> true))
let inst = FreshenTypeInst ncenv.g m (tcref.Typars m)
let _, inst2, tTypes = inst
let ttype = TType_app(tcref, tTypes, ncenv.g.knownWithoutNull)
let item = Item.Types(tcref.DisplayName, [ttype])
CallNameResolutionSink sink (m, nenv, item, inst2, occurence, ad)
Result(resInfo, tcref, tTypes)

let _, tinst, tyargs = FreshenTypeInst ncenv.g m (tcref.Typars m)
let item = Item.Types(tcref.DisplayName, [TType_app(tcref, tyargs, ncenv.g.knownWithoutNull)])
CallNameResolutionSink sink (m, nenv, item, tinst, occurence, ad)

Result(resInfo, tcref, tyargs)

| Exception exn ->
Exception exn
Expand Down

0 comments on commit e1679c4

Please sign in to comment.