Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method name collision with kotlin reserved word #638

Open
omainegra opened this issue Apr 8, 2016 · 5 comments
Open

Method name collision with kotlin reserved word #638

omainegra opened this issue Apr 8, 2016 · 5 comments
Assignees

Comments

@omainegra
Copy link

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
Copy link
Collaborator

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

@artem-zinnatullin
Copy link
Member

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
#638 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA7B3EuC9cil4R2Htc7SgPEBO_-OGEghks5qX80ngaJpZM4IDdRg
.

@artem-zinnatullin
Copy link
Member

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

@artem-zinnatullin artem-zinnatullin added this to the v2.0.0 milestone May 18, 2017
@artem-zinnatullin artem-zinnatullin self-assigned this May 18, 2017
@KChernenko
Copy link

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

@artem-zinnatullin
Copy link
Member

Something like this should work:

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

@artem-zinnatullin artem-zinnatullin modified the milestone: v2.0.0 Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants