In my case, it was in Dart. Dart allows extending existing classes with new methods, but unfortunately this doesn't allow implementing abstract mixins (which is the equivalent of Rust's trait) on other types. Dart is in this weird middle where it's not really strictly typed (it has dynamic, which is like the any type in TypeScript), but the compiler doesn't allow ducktyping anyways.
In my case, it was in Dart. Dart allows extending existing classes with new methods, but unfortunately this doesn't allow implementing abstract mixins (which is the equivalent of Rust's trait) on other types. Dart is in this weird middle where it's not really strictly typed (it has
dynamic
, which is like theany
type in TypeScript), but the compiler doesn't allow ducktyping anyways.