I stumbled upon this interesting code sample today...
# announcements
m
I stumbled upon this interesting code sample today: https://discuss.kotlinlang.org/t/compound-extension/10722/41 Can anyone explain why does it behave like that?
s
Is there a typo in this code sample?
Copy code
open class B
class B1 : A()
shouldn't that be
class B1 : B()
?
If so, then the program fails with
Overload resolution ambiguity:
f
You probably meant to make B1 implement B. As it stands it implements A
So only the second overload is valid for the inputs
m
It's not my code, I was just curious but you are right, thank you folks! :)