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

Tuple is displayed as () #135

Closed
leandromoh opened this issue Nov 17, 2023 · 3 comments
Closed

Tuple is displayed as () #135

leandromoh opened this issue Nov 17, 2023 · 3 comments
Assignees
Labels

Comments

@leandromoh
Copy link

leandromoh commented Nov 17, 2023

Since expression tree are interpreted in AOT (then slow), I am considering use this library to help me translate my expression tree to C# source code and compile it with source generator, but I found the following issue:

I had the following expression

Expression<Func<ValueTuple<int,int,int>>> ex => () => new ValueTuple<int,int,int>();

I was expecting to see one of the following valid constructs

  • new ValueTuple<int,int,int>()
  • default(ValueTuple<int,int,int>)
  • default((int,int,int))

however the displayed text is (), which is not a valid value for ValueTuple<int,int,int> during c# compilation.

@leandromoh leandromoh changed the title Tuple is showed as () instead of type. Tuple is displayed as () Nov 17, 2023
@SteveWilkes SteveWilkes self-assigned this Nov 25, 2023
@SteveWilkes
Copy link
Member

SteveWilkes commented Jun 22, 2024

I know it's been a long (long) time, but thanks for the bug report - this is fixed in the vNext release branch - release to follow!

...I went with new ValueTuple<int, int, int>(), btw :)

@SteveWilkes SteveWilkes added the in-branch A feature or bug fix exists in code, and a release will follow label Jun 22, 2024
SteveWilkes added a commit that referenced this issue Jun 22, 2024
* Fixing nullable enum translation, re: #134

* Extending ShowCapturedValues capabilities

* Adding .NET 8 test project

* Fixing parameterless Value Tuple translation, re: #135

* Tidy

* Fixing non-equality enum comparisons, re #136

* v4.1.2

* Release notes

---------

Co-authored-by: Steve Wilkes <[email protected]>
@SteveWilkes
Copy link
Member

This is fixed as of v4.1.2, which is now available on NuGet. Cheers!

@SteveWilkes SteveWilkes removed the in-branch A feature or bug fix exists in code, and a release will follow label Jun 24, 2024
@leandromoh
Copy link
Author

leandromoh commented Jun 24, 2024

Thank you @SteveWilkes. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants