Hi,
I’m pretty new in Kotlin, even if I feel confident now, and I’d like an expert advice before submitting a bug in IntelliJ IDEA…
I have just used the automatic toString
generation feature of IDEA in one of my Kotlin classes, and this is the result:
return "AppointmentSlotType(label='$label', activeFrom=$activeFrom, activeTo=$activeTo) ${super}"
pretty straightforward, but now the IDE complains about the super
keyword: ‘super’ is not an expression, it can only be used on the left-hand side of a dot
I’m pretty sure the generated code is indeed ok, as it implicitly calls toString()
on super
, and the bug resides in a wrong IntelliJ IDEA inspection.
Otherwise, if you think the above code is somewhat wrong or poses some subtle problems, the bug resides in the code generation feature.
In any case, there’s a bug in the IDE and I’ll submit it on YouTrack ASAP…
Thanks!
Paolo