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

Microsoft.DotNet.GenAPI.Tests/CSharpFileBuilderTests.cs in SDK repo test failures #74109

Open
MiYanni opened this issue Jun 21, 2024 · 1 comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@MiYanni
Copy link
Member

MiYanni commented Jun 21, 2024

Summary

In dotnet/sdk, there were 2 tests marked against this original issue. That issue has been closed, but unskipping the tests still results in failure. This is to investigate those test failures.

TestInterfaceWithOperatorGeneration

Fails with:

    Expected:
    namespace A
    {
        public partial interface IntType
        {
            public static IntType operator +(IntType left, IntType right) => left + right;
        }
    }
    Resulted:
    namespace A
    {
        public partial interface IntType
        {
            static public IntType operator +(IntType left, IntType right) { throw null; };
        }
    }

TestInterfaceWithCheckedOperatorGeneration

Fails with:

    Expected:
    namespace A
    {
        public interface IAdditionOperators<TSelf, TOther, TResult>
            where TSelf : IAdditionOperators<TSelf, TOther, TResult>?
        {
            static abstract TResult operator +(TSelf left, TOther right);
            static virtual TResult operator checked +(TSelf left, TOther right) { throw null; }
        }
    }
    Resulted:
    namespace A
    {
        public partial interface IAdditionOperators<TSelf, TOther, TResult>
            where TSelf : IAdditionOperators<TSelf, TOther, TResult>?
        {
            static public abstract TResult operator +(TSelf left, TOther right) { throw null; };
            static public virtual TResult operator checked +(TSelf left, TOther right) { throw null; };
        }
    }
@jaredpar
Copy link
Member

Can you expand on what you think is a bug in the compiler?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants