- 
                Notifications
    You must be signed in to change notification settings 
- Fork 834
Labels
Area-LangService-APIBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
Description
SynPat.Named(range=range) -> range doesn't include accessibility modifier (public, internal,public)
Repro steps
let private value = 42
//  ^^^^^^^^^^^^^ SynPat.Named(ident="value"; accessibility=Some(Private))
//          ^^^^^ range of SynPat.NamedAst:
Named(
  SynIdent (value, None),
  false,
  Some Private,
  tmp.fsx (1,12-1,17)
)
-> Range covers columns 12 to 17 -> just value but not private
Expected behavior
Range of SynPat.Named includes private
Actual behavior
Range just covers identifier
Known workarounds
None?
SynAccess doesn't provide its range -> cannot combine ranges of elements inside SynPat.Named to get full range.
Maybe possible to infer by looking at parent and its SynPat.Named hole?
Or via source text: extract word in front of Named/its ident
Related information
SynPat.LongIdent includes SynAccess range:
let (private Some _) = None
//   ^^^^^^^^^^^^^^ SynPat.LongIdent
//   ^^^^^^^^^^^^^^ range of SynPat.LongIdent(AST)
- dotnet --version:- 6.0.202
- FCS: 41.0.4-preview.22181.2&41.0.3& currentdotnet/fsharpmainbranch (91fb779)
Metadata
Metadata
Assignees
Labels
Area-LangService-APIBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Type
Projects
Status
New