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

Splitting binding code for Decontsruct into separate file #11983

Merged
merged 2 commits into from
Jun 14, 2016

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented Jun 13, 2016

No description provided.

@jcouv
Copy link
Member Author

jcouv commented Jun 14, 2016

@dotnet/roslyn-compiler team for review. This is just splitting the Deconstruct binding code into a separate file, and updating a couple comments.

@jcouv
Copy link
Member Author

jcouv commented Jun 14, 2016

@VSadov Could I get a sign-off on this refactoring (splitting code into separate file)?

@AlekseyTs
Copy link
Contributor

LGTM

@jcouv jcouv merged commit f9a0d0b into dotnet:features/tuples Jun 14, 2016
@jcouv
Copy link
Member Author

jcouv commented Jun 14, 2016

Merged with a single approval since there is no new code introduced.

result.WasCompilerGenerated = true;
diagnostics.AddRange(bag);

if (bag.HasAnyErrors())
Copy link
Contributor

Choose a reason for hiding this comment

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

I missed this during the previous review. It might be inappropriate to use HasAnyErrors here. There are at least two reasons for that:

  • It resolves lazy diagnostics, which could create circularity problems in certain contexts.
  • Lazy errors shouldn't really fail the binding. An example would be an obsolete Deconstruct method. Yes, it is an error to use it, but that shouldn't prevent us from recording the actual binding information and continuing to the next level. I.e. we shouldn't complain that we couldn't find a suitable method.

Consider using HasAnyResolvedErrors instead and adding a test with an obsolete Deconstruct method.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks. I took a note in #11299 to fix this.

@VSadov
Copy link
Member

VSadov commented Jun 14, 2016

LGTM

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.

4 participants