Associated consts in traits interact weirdly with type inference #100282
Labels
A-associated-items
Area: Associated items such as associated types and consts.
A-inference
Area: Type inference
A-traits
Area: Trait system
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
I tried this code (playground):
I expected this to compile and pass the assertion.
Instead, this happened: compiler successfuly inferred type for
tb
, but for some reason didn’t use the associated constant from trait:Meta
Replicates on stable, beta and nightly on playground (v1.62.1, v1.63.0-beta9 and 1.65.0-nightly (2022-08-07 d394408) respectively).
The text was updated successfully, but these errors were encountered: