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

Add default method support to virtual statics #69783

Merged
merged 5 commits into from
May 26, 2022

Conversation

MichalStrehovsky
Copy link
Member

Corresponds to #64717 that I somehow missed, despite commenting on it.

We still don't allow interfaces to implement methods of other interfaces. The CLR VM doesn't allow either. That's #66887 that I confused #64717 with.

Unblocks #69756.

Cc @dotnet/ilc-contrib

Corresponds to dotnet#64717 that I somehow missed, despite commenting on it.

We still don't allow interfaces to implement methods of other interfaces. The CLR VM doesn't allow either.
{
interface IFoo
{
static virtual string GetCookie() => nameof(IFoo);
Copy link
Member

Choose a reason for hiding this comment

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

This is going to need 3e71423

That is you need <MicrosoftNetCompilersToolsetVersion>4.3.0-2.22270.4</MicrosoftNetCompilersToolsetVersion> or later

@@ -562,6 +562,16 @@ public static MethodDesc TryResolveConstraintMethodApprox(this TypeDesc constrai
method = null;
}

// Default implementation logic, which only kicks in for default implementations when lookin up on an exact interface target
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
// Default implementation logic, which only kicks in for default implementations when lookin up on an exact interface target
// Default implementation logic, which only kicks in for default implementations when looking up on an exact interface target

@MichalStrehovsky
Copy link
Member Author

@dotnet/runtime-infrastructure is it expected that pull requests like this trigger so many jitstress, gcstress, and outerloop runs? It seems a bit excessive.

@trylek
Copy link
Member

trylek commented May 25, 2022

CF #69829

@jkoritzinsky
Copy link
Member

There's an ongoing issue tracked at #69829 .

@MichalStrehovsky MichalStrehovsky merged commit fbed4a7 into dotnet:main May 26, 2022
@MichalStrehovsky MichalStrehovsky deleted the defltStatIntf branch May 26, 2022 03:44
tannergooding pushed a commit that referenced this pull request May 31, 2022
Corresponds to #64717 that I somehow missed, despite commenting on it.

We still don't allow interfaces to implement methods of other interfaces. The CLR VM doesn't allow either.
carlossanlop pushed a commit that referenced this pull request Jun 2, 2022
…urating/Truncating APIs to match API review (#70034)

* Update MicrosoftNetCompilersToolsetVersion to 4.3.0-2.22270.4

* Moving System.Runtime.InteropServices.NFloat down to System.Runtime

* Removing the generic-math CreateChecked, CreateSaturating, CreateTruncating, and TryCreate implementations

* Removing the generic-math TryCreate tests

* Adding the TryConvertTo* and TryConvertFrom* generic math APIs for Checked, Saturating, and Truncating

* Filling out test coverage for the CreateChecked generic-math API

* Fix some edge cases for the CreateSaturating generic-math APIs

* Filling out test coverage for the CreateSaturating generic-math API

* Fix some edge cases for the CreateTruncating generic-math APIs

* Filling out test coverage for the CreateTruncating generic-math API

* Fixing some edge cases in converting BigInteger/Complex to the primitive types

* Filling out test coverage for converting BigInteger and Complex to the primitive types

* Fixing some 32-bit generic-math tests

* Removing the static virtual declarations since things are falling over

* Skipping some tests on Mono where it has bad behavior

* Revert "Removing the static virtual declarations since things are falling over"

This reverts commit baf69de.

* Move NFloat back to System.Runtime.InteropServices based on feedback

* Fixing the Int128/UInt128 to Decimal tests

* Ensure `JIT_Dbl2ULng` correctly handles NaN

* Revert "Ensure `JIT_Dbl2ULng` correctly handles NaN"

This reverts commit 3298345.

* Explicitly ensure floating-point to ulong conversion returns 0 for NaN

* Add default method support to virtual statics (#69783)

Corresponds to #64717 that I somehow missed, despite commenting on it.

We still don't allow interfaces to implement methods of other interfaces. The CLR VM doesn't allow either.

Co-authored-by: Tanner Gooding <tagoo@outlook.com>
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
@ghost ghost locked as resolved and limited conversation to collaborators Jun 25, 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.

5 participants