Skip to content

Type mismatching cased by duplicate associated type resolution #59326

Open
@fanzeyi

Description

@fanzeyi

Apologize that I could not give any code example right now. I'm working on creating one but it seems tricky.

The compiler is complaining about [E0308]: mismatched types where it said it's expecting for a trait SomeTrait<Apple=SomeApple, Apple=SomeApple, Banana=SomeBanana, Banana=SomeBanana> but got SomeTrait<Apple=SomeAPple, Banana=SomeBanana>. Only some of the associated types in that trait are repeated once and there are few others are not repeated.

The example I gave in #59324 is an intermediate result of my attempt to create a minimal reproducible code to this issue. The type mismatch happened at the with_factory method when resolving concrete type for ThriftService.

The error happened when I'm doing the update from 1.32.0 to 1.33.0 so it's clearly a regression.

Also, please let me know if you have any suggestion on bypassing this problem or tips on re-creating the problematic code.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-type-systemArea: Type systemC-bugCategory: This is a bug.D-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions