Skip to content

Commit

Permalink
Merge pull request #6724 from microsoft/merges/dev16.2-to-fsharp5
Browse files Browse the repository at this point in the history
Merge dev16.2 to fsharp5
  • Loading branch information
dotnet-automerge-bot authored May 14, 2019
2 parents 42e6c11 + d697eac commit ed2c0f9
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/fsharp/symbols/Symbols.fs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.

namespace FSharp.Compiler.SourceCodeServices

Expand Down Expand Up @@ -1393,7 +1393,12 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
let mkEventSym einfo = FSharpMemberOrFunctionOrValue(cenv, E einfo, Item.Event einfo)

new (cenv, vref) = FSharpMemberFunctionOrValue(cenv, V vref, Item.Value vref)
new (cenv, minfo) = FSharpMemberFunctionOrValue(cenv, M minfo, Item.MethodGroup(minfo.LogicalName, [minfo], None))

new (cenv, minfo: MethInfo) =
if minfo.IsConstructor || minfo.IsClassConstructor then
FSharpMemberFunctionOrValue(cenv, C minfo, Item.CtorGroup(minfo.LogicalName, [minfo]))
else
FSharpMemberFunctionOrValue(cenv, M minfo, Item.MethodGroup(minfo.LogicalName, [minfo], None))

member __.IsUnresolved =
isUnresolved()
Expand All @@ -1407,16 +1412,22 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
member x.Overloads matchParameterNumber =
checkIsResolved()
match d with
| M m ->
| M m | C m ->
match item with
| Item.MethodGroup (_name, methodInfos, _) ->
| Item.MethodGroup (_, methodInfos, _)
| Item.CtorGroup (_, methodInfos) ->
let isConstructor = x.IsConstructor
let methods =
if matchParameterNumber then
methodInfos
|> List.filter (fun methodInfo -> not (methodInfo.NumArgs = m.NumArgs) )
else methodInfos
methods
|> List.map (fun mi -> FSharpMemberOrFunctionOrValue(cenv, M mi, item))
|> List.map (fun mi ->
if isConstructor then
FSharpMemberOrFunctionOrValue(cenv, C mi, item)
else
FSharpMemberOrFunctionOrValue(cenv, M mi, item))
|> makeReadOnlyCollection
|> Some
| _ -> None
Expand Down Expand Up @@ -1997,7 +2008,8 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
match d, other.Data with
| E evt1, E evt2 -> EventInfo.EventInfosUseIdenticalDefintions evt1 evt2
| P p1, P p2 -> PropInfo.PropInfosUseIdenticalDefinitions p1 p2
| M m1, M m2 -> MethInfo.MethInfosUseIdenticalDefinitions m1 m2
| M m1, M m2
| C m1, C m2 -> MethInfo.MethInfosUseIdenticalDefinitions m1 m2
| V v1, V v2 -> valRefEq cenv.g v1 v2
| _ -> false
| _ -> false
Expand Down

0 comments on commit ed2c0f9

Please sign in to comment.