https://kotlinlang.org logo
n

Nikky

01/19/2019, 4:29 AM
apparently a kotlin script cannot implement abstract function the script definition.. or at least ide things its a conflicting overload
i

ilya.chernikov

01/21/2019, 10:01 AM
Yep, it is not possible at the moment, and there is no easy solution for it now. Feel free to add an issue to the YT though.
n

Nikky

01/21/2019, 10:13 AM
along with a repducer in a branch of my scripting sandbox
i

ilya.chernikov

01/21/2019, 10:28 AM
Thank you for reporting. As I said, it is not something easily fixable, but it is good to have it reported anyway.
n

Nikky

01/21/2019, 10:30 AM
it would be such a powerful feature to have function that need to be implemented scripts can then be evaluated and functions can be executed later or multiple times without re-evaluation also it gives the user a good idea of what they should write in the script
for now i just made a
lateinit var function: () -> Unit
i nthe script definition and assign that in the script.. its not very pretty though and the only feedbackthe user gets is that it blows up when not being assigned
2 Views