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

Handling remaining PROTOTYPE markers in features/tuples branch #12411

Merged
merged 5 commits into from
Jul 11, 2016

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented Jul 9, 2016

Filed the following issues:

I spent some time today trying to come up with a better solution for the last one, but after discussion with Vlad, I prefer to unblock the merge back to master and resolve the difficult language questions later. For now, I report errors if you try to use typeless tuple literals in a d-declaration (which is better than previous crashing behavior).

@dotnet/roslyn-compiler for review.
Related to #11299

@@ -56,14 +56,23 @@ private BoundDeconstructionAssignmentOperator BindDeconstructionAssignment(CShar

if ((object)boundRHS.Type == null)
Copy link
Member

Choose a reason for hiding this comment

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

How do we distinguish between the case:

  • RHS is (null, null) and hence has no type
  • RHS is in error and hence has no type.

In the latter case I assume we wouldn't want to go down this code path.

Copy link
Member Author

Choose a reason for hiding this comment

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

When RHS is in error, its type is ErrorType (not null) which is already handled below (by DeconstructIntoStep). Added a test explicitly for this.

Copy link
Member

Choose a reason for hiding this comment

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

Do we have a good rule for when errors will cause Type to be ErrorType and when it will be null? Having both without a justification for when to choose one or the other make it harder to review code.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good question. I haven't heard any. So far, the cases I encountered where Type was null is in the expression null and also typeless tuples (() => {}, null).
I filed issue #12428 and will follow-up on that question separately.

@jcouv
Copy link
Member Author

jcouv commented Jul 11, 2016

@dotnet/roslyn-compiler Please review. I want to merge the deconstruction feature back into the master branch before lunch.

@jaredpar
Copy link
Member

:shipit:

@VSadov
Copy link
Member

VSadov commented Jul 11, 2016

LGTM

@jcouv jcouv merged commit 758e159 into dotnet:features/tuples Jul 11, 2016
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

4 participants