Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit c067e83

Browse files
author
MikhailArkhipov
committed
Property compare overloads
1 parent c68bb1f commit c067e83

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/Analysis/Engine/Impl/OverloadResult.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ public override string ToString() {
136136
var doc = string.IsNullOrEmpty(Documentation) ? "" : "'''{0}'''".FormatInvariant(Documentation);
137137
return "{0}({1}) -> {2}{3}".FormatInvariant(Name, parameters, returnType, doc);
138138
}
139+
140+
public override bool Equals(object obj) {
141+
if(obj is OverloadResult other) {
142+
return OverloadResultComparer.Instance.Equals(this, other);
143+
}
144+
return base.Equals(obj);
145+
}
146+
public override int GetHashCode() => OverloadResultComparer.Instance.GetHashCode(this);
139147
}
140148

141149
class AccumulatedOverloadResult {

src/Analysis/Engine/Impl/Values/ClassInfo.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -831,10 +831,6 @@ public static IAnalysisSet GetMemberFromMroNoReferences(IEnumerable<IAnalysisSet
831831
result = result.Union(ns.GetMember(node, unit, name));
832832
}
833833
}
834-
835-
if (result != null && result.Count > 0) {
836-
break;
837-
}
838834
}
839835
return result;
840836
}

src/LanguageServer/Impl/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// See the Apache Version 2.0 License for specific language governing
1515
// permissions and limitations under the License.
1616

17-
// #define WAIT_FOR_DEBUGGER
17+
#define WAIT_FOR_DEBUGGER
1818

1919
using System;
2020
using Microsoft.Python.LanguageServer.Services;

0 commit comments

Comments
 (0)