storio
storio copied to clipboard
Method name collision with kotlin reserved word
Methods Prepared*.object
have collision with kotlin object
reserved word. It's kind of ugly be calling this way
storIOSQLite.delete().
object(toDelete)
@artem-zinnatullin what do you think about adding alias method for object
for better experience in Kotlin?
I'd just add extension function in the project that uses StorIO :)
On Thu, 21 Jul 2016, 22:48 Ilya Zorin, [email protected] wrote:
@artem-zinnatullin https://github.com/artem-zinnatullin what do you think about adding alias method for object for better experience in Kotlin?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pushtorefresh/storio/issues/638#issuecomment-234363358, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7B3EuC9cil4R2Htc7SgPEBO_-OGEghks5qX80ngaJpZM4IDdRg .
Ok, since Kotlin is now an official Android language we need to actually resolve this in 2.0.0
@artem-zinnatullin could you provide example of that extension function, please?
Something like this should work:
fun <T> PreparedGetObject.Builder<T>.kobject(type: Class<T>) = this.`object(type)`