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

LuaJ doesn't call user defined metamethods __pairs nor __ipairs #1735

Closed
payonel opened this issue Apr 3, 2016 · 3 comments
Closed

LuaJ doesn't call user defined metamethods __pairs nor __ipairs #1735

payonel opened this issue Apr 3, 2016 · 3 comments

Comments

@payonel
Copy link
Member

payonel commented Apr 3, 2016

It appears that tab completion does not work in the lua prompt on LuaJ archs, and further investigation finds that the reason is because the environment is failing to supply a list of available keywords -- and the reason appears to be that user defined __ipairs and __pairs metamethods are NOT called (__len and __index are). I have not tested other metamethods.

@fnuecke
Copy link
Member

fnuecke commented Apr 3, 2016

Paging LuaJ master @gamax92.

Sorry, something went wrong.

@dgelessus
Copy link
Contributor

I think __ipairs is deprecated since Lua 5.3, because ipairs now respects __index. __pairs isn't though.

Sorry, something went wrong.

@payonel
Copy link
Member Author

payonel commented Apr 3, 2016

Without looking it up, I'll agree that sounds familiar :)
I felt it worth noting that the tab-completion bug needs __pairs fixed, not __ipairs.

Sorry, something went wrong.

@fnuecke fnuecke closed this as completed in 5a43bfd Apr 4, 2016
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

3 participants