pushtorefresh / storio

Reactive API for SQLiteDatabase and ContentResolver.
Apache License 2.0
2.55k stars 182 forks source link

Method name collision with kotlin reserved word #638

Open omainegra opened 8 years ago

omainegra commented 8 years ago

Methods Prepared*.object have collision with kotlin object reserved word. It's kind of ugly be calling this way

storIOSQLite.delete().object(toDelete)

geralt-encore commented 8 years ago

@artem-zinnatullin what do you think about adding alias method for object for better experience in Kotlin?

artem-zinnatullin commented 8 years ago

I'd just add extension function in the project that uses StorIO :)

On Thu, 21 Jul 2016, 22:48 Ilya Zorin, notifications@github.com 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 .

artem-zinnatullin commented 7 years ago

Ok, since Kotlin is now an official Android language we need to actually resolve this in 2.0.0

KChernenko commented 7 years ago

@artem-zinnatullin could you provide example of that extension function, please?

artem-zinnatullin commented 7 years ago

Something like this should work:

fun <T> PreparedGetObject.Builder<T>.kobject(type: Class<T>) = this.`object(type)`