-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Type mismatching cased by duplicate associated type resolution #59326
Copy link
Copy link
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-type-systemArea: Type systemArea: Type systemC-bugCategory: This is a bug.Category: This is a bug.D-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant 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.Relevant to the types team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-type-systemArea: Type systemArea: Type systemC-bugCategory: This is a bug.Category: This is a bug.D-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant 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.Relevant to the types team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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 typeswhere it said it's expecting for a traitSomeTrait<Apple=SomeApple, Apple=SomeApple, Banana=SomeBanana, Banana=SomeBanana>but gotSomeTrait<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_factorymethod when resolving concrete type forThriftService.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.