Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline type arguments parse issue #15171

Open
nojaf opened this issue May 2, 2023 · 0 comments
Open

Multiline type arguments parse issue #15171

nojaf opened this issue May 2, 2023 · 0 comments
Labels
Area-Compiler-Syntax lexfilter, indentation and parsing Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@nojaf
Copy link
Contributor

nojaf commented May 2, 2023

Hello,

I believe we may have found a lexer bug.

Repro steps

type Terminal =
    abstract onKey:
        IEvent<
            Foo<
                Bar * int
             >
        > with get, set

    abstract onKey2:
        IEvent<
            Foo<
                Bar * int
            >
        > with get, set

onKey is valid code while onKey2 is not. (online tool).

The difference is that onKey has an additional space before the closing > of Foo.
In both cases, there is no problem with IEvent. So it only seems to manifest itself in nested situations.

Expected behaviour

I'm not sure if this needs another relaxation, but I assume the alignment of the identifier and closing > is allowed.

Actual behaviour

In nested scenarios, this doesn't appear to be the case.

Known workarounds

Adding one extra space avoids the problem.

Related information

See fsprojects/fantomas#2852

@github-actions github-actions bot added this to the Backlog milestone May 2, 2023
@0101 0101 added Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. Area-Compiler-Syntax lexfilter, indentation and parsing and removed Needs-Triage labels May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compiler-Syntax lexfilter, indentation and parsing Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
None yet
Development

No branches or pull requests

2 participants