Feature associated_type_defaults fails to resolve type equality #41868
Labels
A-trait-system
Area: Trait system
A-type-system
Area: Type system
C-bug
Category: This is a bug.
F-associated_type_defaults
`#![feature(associated_type_defaults)]`
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
As far as I can tell, this is a legitimate bug, and I have not been able to find any similar reports on github.
I have a project where I have greatly simplified my codebase using associated_type_defaults. However, it seems like the type checker can't figure out that the literal type of the default case is the same as the default case. I have condensed my problem to the following test-case.
I feel both variants should definitely be valid, since the default is clearly Self. Have I misunderstood something, or is this a bug?
The text was updated successfully, but these errors were encountered: