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

[Bug]: source generation fails when interfaces mismatch in casing when inheriting generic interfaces. #1689

Closed
luukn333 opened this issue Apr 26, 2024 · 0 comments · Fixed by #1930
Labels

Comments

@luukn333
Copy link

luukn333 commented Apr 26, 2024

Describe the bug 🐞

When an interface inherits a generic interface with the same name but different casing source generation fails for all interfaces.

Step to reproduce

If you include these interfaces in the project source generation will fail for all Refit interfaces. Note the difference casing in IexampleClient and IExampleClient<Example>.

namespace Refit.Repro


public class Example
{
    public string Name { get; set; }
}

public interface IexampleClient : IExampleClient<Example>
{
}

public interface IExampleClient<TEntity>
    where TEntity : Example, new()
{
    [Get("/get")]
    Task<TEntity> Get();
}

Reproduction repository

https://github.com/reactiveui/refit

Expected behavior

The source generation should not fail and generate implementations for the interfaces.

Screenshots 🖼️

No response

IDE

Jetbrains Rider

Operating system

Windows 11

Version

23H2 (OS Build 22631.3447)

Device

No response

Refit Version

7.0.0

Additional information ℹ️

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant