-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
dotnet/roslyn
#23643Labels
Implemented Needs ECMA SpecThis feature has been implemented in C#, but still needs to be merged into the ECMA specificationThis feature has been implemented in C#, but still needs to be merged into the ECMA specificationProposal champion
Milestone
Description
Currently this ref int is not permitted and you need to use ref this int while throughout the language ref T denotes a "ref type" and you may add this modifier on a parameter to define an extension method, so it would be sensible to use this ref int to define a ref extensions method. That being said, the restriction seems arbitrary, both could be allowed but IMO this ref int looks more natural based on current rules.
As a minor point, the fact that all extension method's parameter lists start with this makes it easier to scan for extension methods in a static class.
LDM:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Implemented Needs ECMA SpecThis feature has been implemented in C#, but still needs to be merged into the ECMA specificationThis feature has been implemented in C#, but still needs to be merged into the ECMA specificationProposal champion