Open gabrieldemarmiesse opened 6 months ago
Errors are updated with the latest nightly build (mojo 2024.5.2805 (87564503)):
error: no '__moveinit__' candidates have type 'fn(inout self: T, owned existing: T, /) -> None'
fn __divmod__(self: Self, other: Self) -> Tuple[Self, Self]:
^~~~
error: 'Tuple' parameter #0 has 'Movable' type, but value has type 'Divmodable'
fn __divmod__(self: Self, other: Self) -> Tuple[Self, Self]:
^~~~
note: 'Tuple' declared here
trait Divmodable(CollectionElement):
Bug description
The goal here was to create a trait
Divmodable
which accepts anything implementing__divmod__
. By trying to do this, we get a very strange error. See below. Maybe I'm just misusing traits and I'm missing something.Steps to reproduce
System information