Skip to content

SynLongIdent.IdentsWithTrivia throws exceptions #13842

@auduchinok

Description

@auduchinok
module Module

A.

Ast. Trying to get the idents with trivia leads to the following exception:

Message = “difference between idents and trivia”

StackTraceString = “
  at FSharp.Compiler.Syntax.SynLongIdent.get_IdentsWithTrivia()
    in C:\Developer\fsharp-rebase\src\Compiler\SyntaxTree\SyntaxTree.fs:line 51
 at JetBrains.ReSharper.Plugins.FSharp.Psi.LanguageService.Parsing.FSharpExpressionTreeBuilder.ProcessLongIdentifierExpression(SynLongIdent lidWithDots, Range range)
    in C:\Developer\resharper-fsharp\ReSharper.FSharp\src\FSharp.Psi.Features\src\Parsing\FSharpImplTreeBuilder.fs:line 1188

I can make a workaround, but it's suspicious that the trivia is missing (i.e. empty list instead of [None]), and it should't probably throw instead of return None in this case.

cc @nojaf

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions