@@ -1240,6 +1240,7 @@ type MethInfo =
12401240
12411241/// Tests whether two method infos have the same underlying definition.
12421242/// Used to merge operator overloads collected from left and right of an operator constraint.
1243+ /// Must be compatible with ItemsAreEffectivelyEqual relation.
12431244static member MethInfosUseIdenticalDefinitions x1 x2 =
12441245match x1, x2with
12451246| ILMeth(_, x1,_), ILMeth(_, x2,_) -> ( x1.RawMetadata=== x2.RawMetadata)
@@ -1250,8 +1251,7 @@ type MethInfo =
12501251#endif
12511252| _ -> false
12521253
1253- /// Calculates a hash code of method info. Note: this is a very imperfect implementation,
1254- /// but it works decently for comparing methods in the language service...
1254+ /// Calculates a hash code of method info. Must be compatible with ItemsAreEffectivelyEqual relation.
12551255member x.ComputeHashCode () =
12561256match xwith
12571257| ILMeth(_, x1,_) -> hash x1.RawMetadata.Name
@@ -1689,6 +1689,8 @@ type ILFieldInfo =
16891689| ProvidedField( amap, fi, m) -> Import.ImportProvidedType amap m( fi.PApply(( fun fi -> fi.FieldType), m))
16901690#endif
16911691
1692+ /// Tests whether two infos have the same underlying definition.
1693+ /// Must be compatible with ItemsAreEffectivelyEqual relation.
16921694static member ILFieldInfosUseIdenticalDefinitions x1 x2 =
16931695match x1, x2with
16941696| ILFieldInfo(_, x1), ILFieldInfo(_, x2) -> ( x1=== x2)
@@ -1698,6 +1700,10 @@ type ILFieldInfo =
16981700#endif
16991701/// Get an (uninstantiated) reference to the field as an Abstract IL ILFieldRef
17001702member x.ILFieldRef = rescopeILFieldRef x.ScopeRef( mkILFieldRef( x.ILTypeRef, x.FieldName, x.ILFieldType))
1703+
1704+ /// Calculates a hash code of field info. Must be compatible with ItemsAreEffectivelyEqual relation.
1705+ member x.ComputeHashCode () = hash x.FieldName
1706+
17011707override x.ToString () = x.FieldName
17021708
17031709
@@ -2156,8 +2162,8 @@ type PropInfo =
21562162| FSProp_ -> failwith" no setter method"
21572163
21582164/// Test whether two property infos have the same underlying definition.
2159- ///
21602165/// Uses the same techniques as 'MethInfosUseIdenticalDefinitions'.
2166+ /// Must be compatible with ItemsAreEffectivelyEqual relation.
21612167static member PropInfosUseIdenticalDefinitions x1 x2 =
21622168let optVrefEq g = function
21632169| Some( v1), Some( v2) -> valRefEq g v1 v2
@@ -2172,7 +2178,7 @@ type PropInfo =
21722178#endif
21732179| _ -> false
21742180
2175- /// Calculates a hash code of property info (similar as previous)
2181+ /// Calculates a hash code of property info. Must be compatible with ItemsAreEffectivelyEqual relation.
21762182member pi.ComputeHashCode () =
21772183match piwith
21782184| ILProp ilpinfo-> hash ilpinfo.RawMetadata.Name
@@ -2411,6 +2417,7 @@ type EventInfo =
24112417
24122418
24132419/// Test whether two event infos have the same underlying definition.
2420+ /// Must be compatible with ItemsAreEffectivelyEqual relation.
24142421static member EventInfosUseIdenticalDefintions x1 x2 =
24152422match x1, x2with
24162423| FSEvent( g, pi1, vrefa1, vrefb1), FSEvent(_, pi2, vrefa2, vrefb2) ->
@@ -2422,6 +2429,7 @@ type EventInfo =
24222429| _ -> false
24232430
24242431/// Calculates a hash code of event info (similar as previous)
2432+ /// Must be compatible with ItemsAreEffectivelyEqual relation.
24252433member ei.ComputeHashCode () =
24262434match eiwith
24272435| ILEvent ileinfo-> hash ileinfo.RawMetadata.Name