Skip to content

Conversation

@dsyme
Copy link

@dsyme dsyme commented Jun 22, 2022

  1. Allow authoring of static abstracts in interfaces

  2. Apply abstract slot inference

Tested manually, it's OK to merge this into the PR I think

TODOs to add

  • Check that we can't author static abstracts in classes or structs
  • Add tests for authoring static abstracts in interfaces
  • Add tests for abstract slot inference

Tested manually on

type IAdditionOperator<'T> =
    static abstract op_Addition: 'T * 'T -> 'T

type C() =
    interface IAdditionOperator<C> with
        static member op_Addition(x, y) = C()

and then by inspecting generated IL.

@dsyme
Copy link
Author

dsyme commented Jun 23, 2022

I'm getting

        "Feature 'static abstract interface members' is not supported by target runtime." }]

for all the tests - how do we run them on .NET 7?

@vzarytovskii vzarytovskii merged commit 7546888 into vzarytovskii:statics-in-interfaces-2 Jun 23, 2022
vzarytovskii added a commit that referenced this pull request Aug 16, 2023
vzarytovskii added a commit that referenced this pull request Aug 14, 2024
vzarytovskii added a commit that referenced this pull request Aug 26, 2024
* Update to .NET9p7 SDK

* Add dotnet9 feed

* Update trimming

* update trimming #2
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