Hello. I’m trying to rewrite one of the existing modules in Kotlin to test it out. But I have a problem with default function resolution.
So I’m using aol/cyclops-react library. There is a class LazyFutureStream, that has it’s own method forEach. This method doesn’t just goes over iterator, it does something more complicated. So I need to use it. But kotlin.collections.forEach is imported by default and hides this overriden method. How can I NOT use this extension??
I have this code on Java:
LazyReact.parallelBuilder()
.from(IntStream.of(1, 2, 3, 4))
.forEach((it) -> {
System.out.println(it);
});
And this is Kotlin:
LazyReact.parallelBuilder()
.from(IntStream.of(1,2,3,4))
.forEach {
println(it)
}
Any help appritiated.