Skip to content

Conversation

@TimothyMakkison
Copy link
Contributor

@TimothyMakkison TimothyMakkison commented Oct 19, 2025

Fixes #1147, again this is my first time fixing bugs, no idea if I'm doing it right

Lambdas seem pretty all over the place, I'm pretty sure () => has some issues as well

@belav
Copy link
Owner

belav commented Oct 21, 2025

This has possibly a single edge case that it still needs to handle - https://github.com/belav/csharpier-repos/pull/152/files

I think those all are this same issue

// input and expected output
        Assert.Collection(
            outputSteps,
            // First source output for diagnostics is unchanged.
            step => Assert.Equal(IncrementalStepRunReason.Unchanged, step.Reason),
            // Second source output for generated code is changed.
            step => Assert.Equal(IncrementalStepRunReason.Modified, step.Reason)
        );

// current changes cause it to do this
        Assert.Collection(
            outputSteps,
            // First source output for diagnostics is unchanged.
            step =>
                Assert.Equal(IncrementalStepRunReason.Unchanged, step.Reason),
            // Second source output for generated code is changed.
            step =>
                Assert.Equal(IncrementalStepRunReason.Modified, step.Reason)
        );

@TimothyMakkison
Copy link
Contributor Author

TimothyMakkison commented Oct 26, 2025

Okay, I think I've fixed this issue but have replaced it with a new one, see MemberChains.test. I don't think this is a new issue #1613 parenthesized lambda expressions have the same behaviour.

I assume the fix is found in ArgumentListLike.Print but it may be beyond my current understanding, I'd appreciate your help here.

Before

Select______________________________________(superLongName_________________________ =>
    true
);

After

Select______________________________________(superLongName_________________________ => true
); // weird parentheses,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect formatting for simple lambda expression with comment

2 participants