Skip to content

Allow by-ref Extension methods on value types #15650

Closed
pakrym wants to merge 16 commits into
dotnet:features/moreReffrom
pakrym:pakrym/this-ref
Closed

Allow by-ref Extension methods on value types #15650
pakrym wants to merge 16 commits into
dotnet:features/moreReffrom
pakrym:pakrym/this-ref

Conversation

@pakrym

@pakrym pakrym commented Dec 2, 2016

Copy link
Copy Markdown
Contributor

Reopening #15535 targeting 'features/moreRef'

@pakrym

pakrym commented Dec 2, 2016

Copy link
Copy Markdown
Contributor Author

/cc @jaredpar

<value>To cast a negative value, you must enclose the value in parentheses.</value>
</data>
<data name="ERR_RefExtensionMethodOnNonValueType" xml:space="preserve">
<value>A ref extension methods can only be defined on value types.</value>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

method*

@jamesqo

jamesqo commented Apr 20, 2017

Copy link
Copy Markdown
Contributor

Why was this closed? 😢

@jaredpar

Copy link
Copy Markdown
Member

@jamesqo there is a bigger effort here around ref readonly that includes adding ref and ref readonly extension methods.

https://github.com/dotnet/csharplang/blob/master/proposals/readonly-ref.md#refin-extension-methods

This PR was closed because the code is going to flow in through that branch vs. this PR. In the context of the bigger work extension methods end up get done last. Once we get to extension method section we're going to merge this code into the ref-readonly branch.

@jamesqo

jamesqo commented Apr 20, 2017

Copy link
Copy Markdown
Contributor

@jaredpar Ah, okay. I thought this feature was being abandoned-- glad to see that it isn't.

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.

7 participants