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

Disallow ref-reassignment of struct this #979

Closed
wants to merge 1 commit into from

Conversation

agocke
Copy link
Member

@agocke agocke commented Oct 6, 2017

I propose we add an additional rule to disallow ref-reassignment of the struct this parameter. I can think of no good reason to allow this.

I propose we add an additional rule to disallow ref-reassignment of the struct `this` parameter. I can think of no good reason to allow this.
@dnfclas
Copy link

dnfclas commented Oct 6, 2017

@agocke,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@agocke
Copy link
Member Author

agocke commented Oct 6, 2017

/cc @dotnet/ldm @dotnet/roslyn-compiler

@agocke
Copy link
Member Author

agocke commented Oct 6, 2017

and @jaredpar @jcouv @OmarTawfik @gafter

@benaadams
Copy link
Member

Is already there? cd1a6a9

The left operand must be an expression that binds to a ref local variable, a ref parameter (other than this), or an out parameter.

@benaadams
Copy link
Member

Was brought up in #963 (comment)

@agocke
Copy link
Member Author

agocke commented Oct 7, 2017

@benaadams You're right! This is covered in the previous clause. Great!

@agocke agocke closed this Oct 7, 2017
@agocke agocke deleted the patch-1 branch October 7, 2017 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants