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

Use default tuple fields in conversion since fields from inferred names are marked not usable in C#7 #21553

Merged
merged 3 commits into from
Aug 19, 2017

Conversation

cston
Copy link
Member

@cston cston commented Aug 16, 2017

Customer scenario

Create an unnamed tuple with an implicit conversion to a named tuple in C#7.1 with the default language version (C#7.0). Or use deconstruction assignment where the RHS contains two or more tuple literals with different types and inferred names.

Bugs this fixes:

#21028
#21518

Workarounds, if any

Rewrite the expression to use explicit conversions or explicit tuple element names.

Risk

Low

Performance impact

None

Is this a regression from a previous update?

Regression from inferred tuple names.

How was the bug found?

Customer reported

@cston
Copy link
Member Author

cston commented Aug 16, 2017

@dotnet/roslyn-compiler please review. This is a port of #21029 and #21520 to dev15.3.x.

Copy link
Member

@agocke agocke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@agocke
Copy link
Member

agocke commented Aug 19, 2017

test mac please

Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@agocke agocke merged commit b735460 into dotnet:dev15.3.x Aug 19, 2017
@cston
Copy link
Member Author

cston commented Aug 19, 2017

@binki, thanks for reporting your example. Yes, this change fixes that issue.

@jcouv jcouv added this to the 15.3 milestone Aug 25, 2017
@jcouv
Copy link
Member

jcouv commented Aug 25, 2017

The fix went into 15.3.2
Thanks @cston !

@cston cston deleted the 21518-dev15.3.x branch January 23, 2019 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants