roslyn icon indicating copy to clipboard operation
roslyn copied to clipboard

Fix param collection expression binding in expression trees

Open bernd5 opened this issue 1 year ago • 8 comments

fixes: #74163

bernd5 avatar Jun 26 '24 11:06 bernd5

We should may add a test for the concrete issue, too. I just created one for the root issue. (the test-project seems to have no ref assembly to Net9.0)

bernd5 avatar Jun 26 '24 11:06 bernd5

Oh, then it becomes a breaking change to existing code. But this is wanted???

bernd5 avatar Jun 26 '24 11:06 bernd5

Oh, then it becomes a breaking change to existing code. But this is wanted???

Please see https://github.com/dotnet/csharplang/blob/main/meetings/2024/LDM-2024-06-17.md#params-span-breaks for more information.

AlekseyTs avatar Jun 26 '24 11:06 AlekseyTs

I see - then we would need to fix the lowering (and use an array).

bernd5 avatar Jun 26 '24 11:06 bernd5

I see - then we would need to fix the lowering (and use an array).

Please see https://github.com/dotnet/roslyn/issues/74163#issuecomment-2191548114. First, we need to understand the root cause of the problem. Where and what is going wrong. Only then we can decide what the fix should look like. I suggest you to start with that if you would like to continue working on the issue.

AlekseyTs avatar Jun 26 '24 12:06 AlekseyTs

then we would need to fix the lowering (and use an array).

We probably don't want to change the lowering in this fashion either.

AlekseyTs avatar Jun 26 '24 12:06 AlekseyTs

We probably don't want to change the lowering in this fashion either.

I wouldn't like to change the lowering code for interpolated string, too. We could simply dissallow such code (breaking change) - but this is also not very well.

bernd5 avatar Jun 26 '24 13:06 bernd5

I wouldn't like to change the lowering code for interpolated string, too. We could simply dissallow such code (breaking change) - but this is also not very well.

Let's discuss possible fix strategies in the issue. While proposing a strategy, please make the proposal very specific and detailed. For example, the quote above looks neither specific, nor detailed to me.

AlekseyTs avatar Jun 26 '24 13:06 AlekseyTs