Trait "constructor" methods don't get coercions? #49356
Labels
A-coercions
Area: implicit and explicit `expr as Type` coercions
A-inference
Area: Type inference
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Working on #41414, I found this error that surprised me:
I'd expected that it'd work, since the trait method is
-> Self
, and the result of the block is fully constrained, and writing it this way of course works:Of course, this may well just be a normal "mixing coercions and inference is annoying" case that people who understand inference wouldn't have expected to work 😅
The text was updated successfully, but these errors were encountered: