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

[Lua] The reserved functions "objectToIndex" and "objectFromIndex" collide with user functions #1053

Open
jlfarris91 opened this issue Mar 22, 2022 · 0 comments

Comments

@jlfarris91
Copy link

jlfarris91 commented Mar 22, 2022

image

These two functions are apparently reserved but the developer is unaware. I have a tuple called 'object' in my project and necessarily I created indexing functions 'objectToIndex' and 'objectFromIndex'. Afaik the compiler did not warn me that I shouldn't use these reserved names and ultimately it used my functions instead of the wurst-generated object indexing functions that are generated when using "x castTo int".

Ideally I am able to use them since I can in jass and otherwise I would have to rewrite a large library. Maybe the compiler can detect if those functions have been defined by the user and instead generate different function names?

Or just change the names to something that is less likely to collide with developer code? "__objectFromIndex" and "__objectToIndex" perhaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant