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

Missing name for ValueTuple in Linq #3014

Closed
sgkoishi opened this issue Jun 17, 2023 · 0 comments
Closed

Missing name for ValueTuple in Linq #3014

sgkoishi opened this issue Jun 17, 2023 · 0 comments
Assignees
Labels
Bug Decompiler The decompiler engine itself
Milestone

Comments

@sgkoishi
Copy link

sgkoishi commented Jun 17, 2023

Input code

using System.Linq;

var a = args.Select(v => (Name: v, Value: v))
    .OrderBy(kvp => kvp.Name)
    .First();

Erroneous output

(from v in args
    select (v, v) into c
    orderby c.Name
    select c).First()

The decompiled version is select (v, v) without the name (Name, Value) of the ValueTuple, thus the later orderby c.Name shows the error does not contain a definition for 'Name' ...

Details

  • Product in use: ILSpy
  • Version in use: 8.0, also tested latest CI version 8.0.0.7405.
@sgkoishi sgkoishi added Bug Decompiler The decompiler engine itself labels Jun 17, 2023
@siegfriedpammer siegfriedpammer added this to the 8.2 milestone Oct 23, 2023
@siegfriedpammer siegfriedpammer self-assigned this Oct 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Decompiler The decompiler engine itself
Projects
None yet
Development

No branches or pull requests

2 participants