Skip to content

PrettyPrint: mixing // and /*..*/ style comments can lead to corrupted user definitions #2998

@CarlosFigueiraMSFT

Description

@CarlosFigueiraMSFT

If we try to pretty print those user definitions:

MyNF // My Named Formula
    = Pi()/2;

The body (= Pi()/2) will be added after the // My Named Formula comment, which turns it into an erroneous expression

Test file: FormatterTests.cs; test method: TestUserDefinitionsPrettyPrint

[InlineData("MyNF // My Named Formula\n    = Pi()/2;", "MyNF // My Named Formula\n    = Pi() / 2;")]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions