Impl self methods not checking impl self constraints #5046
Labels
bug
Something isn't working
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
compiler
General compiler. Should eventually become more specific as the issue is triaged
As found by @bitzoic in #5045
This compiles:
When this does not, even though the
insert()
function uses the samesha256<T>()
function:Originally posted by @bitzoic in #5045 (comment)
Seems like
storage.my_map.insert(my_struct, 2)
should not compile because my_struct does not implement the Hash trait, the insert should inherit the constraints from the impl self but somehow it does not detect the missing constraint.The text was updated successfully, but these errors were encountered: