Skip to content

Conversation

@tannergooding
Copy link
Member

These were meant to be publicly accessible, but interface DIMs aren't available by default on the implementing type, they have to be redeclared to be part of the public API surface.

@tannergooding tannergooding marked this pull request as ready for review June 30, 2022 16:02
@ghost ghost assigned tannergooding Jun 30, 2022
@ghost
Copy link

ghost commented Jun 30, 2022

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Jun 30, 2022

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

Issue Details

These were meant to be publicly accessible, but interface DIMs aren't available by default on the implementing type, they have to be redeclared to be part of the public API surface.

Author: tannergooding
Assignees: tannergooding
Labels:

area-System.Numerics, new-api-needs-documentation

Milestone: -

static byte INumberBase<byte>.Abs(byte value) => value;

/// <inheritdoc cref="INumberBase{TSelf}.CreateChecked{TOther}(TOther)" />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
Copy link
Member

@stephentoub stephentoub Jul 1, 2022

Choose a reason for hiding this comment

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

We don't have a language mechanism for explicitly invoking the base implementation? That seems like a hole (we probably discussed) that we should address. It's one thing to have a bit of boilerplate that forces us to redeclare the method as a one-liner that just delegates, but having to redo the whole implementation is unfortunate.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, this is a general (and unfortunate) "issue" with DIMs. Ideally the language team comes up with a way to give access to this.

Copy link
Member

Choose a reason for hiding this comment

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

cc: @MadsTorgersen and @jaredpar just to see the impact

@tannergooding tannergooding requested a review from dakersnar July 5, 2022 16:57
Copy link
Contributor

@dakersnar dakersnar left a comment

Choose a reason for hiding this comment

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

LGTM, seems to be the best solution currently available.

@tannergooding tannergooding merged commit 162cca2 into dotnet:main Jul 7, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants