cleiter
08/30/2016, 4:03 PM/* this is package private in another package */ abstract class Parent
class A : Parent()
class B : Parent()
fun x() {
if (true) A()
else B()
}
since it's an expression kotlin tries to get the common return type which is Parent
and then complains that it's not accessible. i'm not interested in the return type. i don't feel like writing as Any
at the end of the if
, is there a better solution?