Why not explicitly define the return type. That should not cause a problem either and is far less clunky.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Needing to override abstract functions feels awkward | 10 | 8946 | June 17, 2022 | |
Override change type | 2 | 937 | April 26, 2020 | |
Can one override a function with lambda expression? | 5 | 4104 | February 23, 2020 | |
Problem with Returning Collection<KProperty1<AnyClass extends BaseType, *> | 2 | 782 | June 6, 2018 | |
Sudden "overrides nothing" errors appear, no recent change to Kotlin build version | 4 | 31287 | December 6, 2017 |