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

Teach the dynamic binder about synthetic ItemN tuple fields #17225

Open
jskeet opened this Issue Mar 17, 2017 · 2 comments

Comments

Projects
None yet
5 participants
@jskeet

jskeet commented Mar 17, 2017

(Originally reported as part of dotnet/roslyn#17911)

While we can't know for sure whether a particular ValueTuple<...> was originally used as a C# tuple type or directly as the CLR type, it's reasonable to err on the side of assuming the language feature was in use - so for dynamic references to d.ItemN where N is greater than 7, the binder should attempt to translate that into d.Rest.Item(N-7) recursively.

@jskeet

This comment has been minimized.

Show comment
Hide comment
@jskeet

jskeet Mar 17, 2017

(And actually, the C# compiler handles CLR-typed ValueTuple<...>.Item9 etc anyway, so that's even more compelling - it really just would be following the same rules at dynamic binding time as at compile time.)

jskeet commented Mar 17, 2017

(And actually, the C# compiler handles CLR-typed ValueTuple<...>.Item9 etc anyway, so that's even more compelling - it really just would be following the same rules at dynamic binding time as at compile time.)

@jcouv

This comment has been minimized.

Show comment
Hide comment
@jcouv
Member

jcouv commented Mar 23, 2017

FYI @VSadov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment