-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Publish notes from extensions WG 2024-01-25 #7874
base: main
Are you sure you want to change the base?
Conversation
This allows for a method group with both methods from extension and underlying type. | ||
|
||
``` | ||
var a1 = EDerived.M2; // method group should incorporate members of EDerived, EBase and C |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EBase.M2
is private
EDerived
has a Method
(also private
) but not M2
Based on the comment I expected to see M2
from a few types but only see one that would be applicable here. Not sure how Method
factors into this.
|
||
### Downlevel support | ||
The new proposed lowering strategy (using `Unsafe.As`) doesn't benefit from using a `ref struct`. | ||
Using a `ref struct` prohibits any downlevel support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? I mean I'm glad that struct
can be used but unclear what ref struct
was stopping in terms of downlevel support.
We instead want to treat the underlying type as a base type. It still comes into play last (meaning after all base extensions) but not conditionally. | ||
This allows for a method group with both methods from extension and underlying type. | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
```csharp |
FYI @MadsTorgersen @AlekseyTs @333fred
Relates to test plan dotnet/roslyn#66722