@@ -518,7 +518,7 @@ type Entity =
518518 x.Data.entity_ range
519519
520520 /// The range in the implementation, adjusted for an item in a signature
521- member x.ImplRange =
521+ member x.DefinitionRange =
522522 match x.Data.entity_ other_ range with
523523 | Some ( r, true ) -> r
524524 | _ -> x.Range
977977 entity_range: range
978978
979979 // MUTABILITY: the signature is adjusted when it is checked
980- /// If the flag is true , this is the implementation range for an item in a signature, otherwise it is
980+ /// If this field is populated , this is the implementation range for an item in a signature, otherwise it is
981981 /// the signature range for an item in an implementation
982982 mutable entity_other_range: ( range * bool ) option
983983
@@ -1303,7 +1303,7 @@ and
13031303 /// Name/range of the case
13041304 Id: Ident
13051305
1306- /// If the flag is true , this is the implementation range for an item in a signature, otherwise it is
1306+ /// If this field is populated , this is the implementation range for an item in a signature, otherwise it is
13071307 /// the signature range for an item in an implementation
13081308 // MUTABILITY: used when propagating signature attributes into the implementation.
13091309 mutable OtherRangeOpt : ( range * bool ) option
@@ -1316,14 +1316,17 @@ and
13161316 mutable Attribs: Attribs }
13171317
13181318 member uc.Range = uc.Id.idRange
1319- member uc.ImplRange =
1319+
1320+ member uc.DefinitionRange =
13201321 match uc.OtherRangeOpt with
13211322 | Some ( m, true ) -> m
13221323 | _ -> uc.Range
1324+
13231325 member uc.SigRange =
13241326 match uc.OtherRangeOpt with
13251327 | Some ( m, false ) -> m
13261328 | _ -> uc.Range
1329+
13271330 member uc.DisplayName = uc.Id.idText
13281331 member uc.RecdFieldsArray = uc.FieldTable.FieldsByIndex
13291332 member uc.RecdFields = uc.FieldTable.FieldsByIndex |> Array.toList
@@ -1373,7 +1376,7 @@ and
13731376 /// Name/declaration-location of the field
13741377 rfield_id: Ident
13751378
1376- /// If the flag is true , this is the implementation range for an item in a signature, otherwise it is
1379+ /// If this field is populated , this is the implementation range for an item in a signature, otherwise it is
13771380 /// the signature range for an item in an implementation
13781381 // MUTABILITY: used when propagating signature attributes into the implementation.
13791382 mutable rfield_other_range: ( range * bool ) option }
@@ -1389,10 +1392,12 @@ and
13891392
13901393 /// Declaration-location of the field
13911394 member v.Range = v.rfield_ id.idRange
1392- member v.ImplRange =
1395+
1396+ member v.DefinitionRange =
13931397 match v.rfield_ other_ range with
13941398 | Some ( m, true ) -> m
13951399 | _ -> v.Range
1400+
13961401 member v.SigRange =
13971402 match v.rfield_ other_ range with
13981403 | Some ( m, false ) -> m
@@ -2050,11 +2055,9 @@ and
20502055 member x.Accessibility = x.Data.val_ access
20512056
20522057 /// Range of the definition (implementation) of the value, used by Visual Studio
2053- /// Updated by mutation when the implementation is matched against the signature.
2054- member x.ImplRange = x.Data.ImplRange
2058+ member x.DefinitionRange = x.Data.DefinitionRange
20552059
20562060 /// Range of the definition (signature) of the value, used by Visual Studio
2057- /// Updated by mutation when the implementation is matched against the signature.
20582061 member x.SigRange = x.Data.SigRange
20592062
20602063 /// The value of a value or member marked with [<LiteralAttribute>]
@@ -2392,7 +2395,7 @@ and
23922395 { val_logical_name: string
23932396 val_compiled_name: string option
23942397 val_range: range
2395- /// If the flag is true , this is the implementation range for an item in a signature, otherwise it is
2398+ /// If this field is populated , this is the implementation range for an item in a signature, otherwise it is
23962399 /// the signature range for an item in an implementation
23972400 mutable val_other_range: ( range * bool ) option
23982401 mutable val_type: TType
@@ -2438,7 +2441,7 @@ and
24382441 /// XML documentation signature for the value
24392442 mutable val_xmldocsig : string }
24402443
2441- member x.ImplRange =
2444+ member x.DefinitionRange =
24422445 match x.val_ other_ range with
24432446 | Some ( m, true ) -> m
24442447 | _ -> x.val_ range
@@ -2711,7 +2714,7 @@ and
27112714 member x.CompiledRepresentationForNamedType = x.Deref.CompiledRepresentationForNamedType
27122715
27132716 /// The implementation definition location of the namespace, module or type
2714- member x.ImplRange = x.Deref.ImplRange
2717+ member x.DefinitionRange = x.Deref.DefinitionRange
27152718
27162719 /// The signature definition location of the namespace, module or type
27172720 member x.SigRange = x.Deref.SigRange
@@ -3051,7 +3054,7 @@ and
30513054 /// For other values it is just the actual parent.
30523055 member x.ApparentParent = x.Deref.ApparentParent
30533056
3054- member x.ImplRange = x.Deref.ImplRange
3057+ member x.DefinitionRange = x.Deref.DefinitionRange
30553058
30563059 member x.SigRange = x.Deref.SigRange
30573060
@@ -3186,11 +3189,16 @@ and UnionCaseRef =
31863189 match x.TyconRef.GetUnionCaseByName x.CaseName with
31873190 | Some res -> res
31883191 | None -> error( InternalError( sprintf " union case %s not found in type %s " x.CaseName x.TyconRef.LogicalName, x.TyconRef.Range))
3192+
31893193 member x.TryUnionCase = x.TyconRef.TryDeref |> Option.bind ( fun tcref -> tcref.GetUnionCaseByName x.CaseName)
3194+
31903195 member x.Attribs = x.UnionCase.Attribs
31913196 member x.Range = x.UnionCase.Range
3192- member x.ImplRange = x.UnionCase.ImplRange
3193- member x.SigRange = x.UnionCase.ImplRange
3197+
3198+ member x.DefinitionRange = x.UnionCase.DefinitionRange
3199+
3200+ member x.SigRange = x.UnionCase.DefinitionRange
3201+
31943202 member x.Index =
31953203 try
31963204 // REVIEW: this could be faster, e.g. by storing the index in the NameMap
@@ -3211,11 +3219,15 @@ and RecdFieldRef =
32113219 match tcref.GetFieldByName id with
32123220 | Some res -> res
32133221 | None -> error( InternalError( sprintf " field %s not found in type %s " id tcref.LogicalName, tcref.Range))
3222+
32143223 member x.TryRecdField = x.TyconRef.TryDeref |> Option.bind ( fun tcref -> tcref.GetFieldByName x.FieldName)
3224+
32153225 member x.PropertyAttribs = x.RecdField.PropertyAttribs
32163226 member x.Range = x.RecdField.Range
3217- member x.ImplRange = x.RecdField.ImplRange
3218- member x.SigRange = x.RecdField.ImplRange
3227+
3228+ member x.DefinitionRange = x.RecdField.DefinitionRange
3229+
3230+ member x.SigRange = x.RecdField.DefinitionRange
32193231
32203232 member x.Index =
32213233 let ( RFRef ( tcref , id )) = x
0 commit comments