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
[TIMOB-26133] TiAPI: Make Ti.Geolocation.hasCompass a method #10121
Conversation
Tests:
Generated by 🚫 dangerJS |
*/ | ||
// clang-format off | ||
@Kroll.method | ||
public boolean hasCompass() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@garymathews Question here: Could it be that V8 does not allow this because the above method (getHasCompass
) also represents a property that is hasCompass
and therefore blocks this method declaration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically, yes. They're both registering as "hasCompass" on the JS type. One as a property that is backed by getHasCompass() and again as a function. I believe V8 is throwing out the duplicate definition.
I don't see how a property with the exact same name can be changed from a "typical" boolean property to a method property in a non-breaking way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhh okay. In that case we just leave the API as it is
JIRA: https://jira.appcelerator.org/browse/TIMOB-26133