fix: comment break indentation of simple lambdas
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
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)
);
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,