<Cyclic delegates> The compiler doesn’t seem to ch...
# forum
r
Cyclic delegates The compiler doesn’t seem to check for cyclic delegates, e.g. if you do something silly like this … interface A interface B class AImpl : A, B by BImpl() class BImpl : B, A by AImpl() fun main() { AImpl() } … it compiles just fine. Of course, when you run it, the result is very predictably… Exception in thread "main" java.lang.StackOverflowError at rummage.BImpl.(delegateCallback.kt:7) at rummage.AImpl.(delegateCallback.kt:6) at rummage.BImpl.(delegateCallback.kt:7) at...