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

Publish notes from extensions WG 2024-01-25 #7874

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented Jan 25, 2024

@jcouv jcouv self-assigned this Jan 25, 2024
@jcouv jcouv requested a review from a team as a code owner January 25, 2024 22:16
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
Copy link
Member

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.
Copy link
Member

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.

```
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
```
```csharp

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.

2 participants