Skip to content

Commit

Permalink
Shortcut NameResolution searches
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Mar 6, 2018
1 parent 0adb823 commit c1868a0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/fsharp/NameResolution.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2705,10 +2705,17 @@ let rec ResolvePatternLongIdentPrim sink (ncenv:NameResolver) fullyQualified war
| _ ->
NoResultsOrUsefulErrors
let resInfo,res,rest =
match AtMostOneResult m (tyconSearch ad +++ moduleSearch ad) with
match AtMostOneResult m (tyconSearch ad) with
| Result _ as res -> ForceRaise res
| _ ->
ForceRaise (AtMostOneResult m (tyconSearch AccessibleFromSomeFSharpCode +++ moduleSearch AccessibleFromSomeFSharpCode))
| _ ->
match AtMostOneResult m (moduleSearch ad) with
| Result _ as res -> ForceRaise res
| _ ->
match AtMostOneResult m (tyconSearch AccessibleFromSomeFSharpCode ) with
| Result _ as res -> ForceRaise res
| _ ->
ForceRaise (AtMostOneResult m (moduleSearch AccessibleFromSomeFSharpCode))

ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> true))

if not (isNil rest) then error(Error(FSComp.SR.nrIsNotConstructorOrLiteral(),(List.head rest).idRange))
Expand Down

0 comments on commit c1868a0

Please sign in to comment.