I do not think this is possible without tricks. The mixin inherits at compile time, when it can be type checked statically, and it always targets a different class, trait, etc. Here you are trying to identify a feature of an existing object on the fly at runtime.
There are workarounds, such as implicit conversions or possibly proxies. Probably the cleanest way would be to make Increment a wrapper class delegating the underlying Iterator. There may be other solutions, depending on your use case.
source share