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

ENC support for C#7.0: out var, ref, tuple and pattern matching #19063

Merged
merged 1 commit into from
Apr 28, 2017

Conversation

ivanbasov
Copy link
Contributor

@ivanbasov ivanbasov commented Apr 28, 2017

Customer scenario

Provides ENC support for C#7.0:

  • out var
  • ref
  • pattern matching
  • tuples

Unit tests provided. Also I verified EnC scenarios manually.

Bugs this fixes:

Fixes #17896
Fixes #12436
Fixes #16960
Some works towards #12435

Workarounds, if any

Risk

Low

Performance impact

Low

Is this a regression from a previous update?

Root cause analysis:

How did we miss it? What tests are we adding to guard against it in the future?

How was the bug found?

Planned

@tmat
Copy link
Member

tmat commented Apr 28, 2017

:shipit:

@tmat
Copy link
Member

tmat commented Apr 28, 2017

This one is not fixed yet: #12435 -- we don't have switch statement working yet.

@jinujoseph
Copy link
Contributor

Do we want to maintain missing switch statement support in pattern matching separately ?

@jcouv
Copy link
Member

jcouv commented Apr 28, 2017

This change looks good as far as it goes, but I am missing some context. I thought that to enable EnC for C# 7 features (such as switch, out var, deconstruction) we needed at least two things:

  • a reasonable distance function for such syntax
  • some logic for managing slots (creating new ones, matching and re-using existing ones)

I this rough understanding correct? Have the latter been done already?

@tmat
Copy link
Member

tmat commented Apr 28, 2017

@jcouv Yes, that's correct. Ivan did both. The latter didn't need any changes in the compiler as it turned out the right syntax nodes were already associated with the local symbols.

@jcouv
Copy link
Member

jcouv commented Apr 28, 2017

Very cool. Nice!

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM

@ivanbasov
Copy link
Contributor Author

Thank you, everybody, for the review and help! I have updated reference to #12435 in the description.

@ivanbasov
Copy link
Contributor Author

Tagging @MattGertz for Ask mode approval

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