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

Fix parent of class declaration. #7

Open
MikuAuahDark opened this issue Jul 31, 2020 · 0 comments
Open

Fix parent of class declaration. #7

MikuAuahDark opened this issue Jul 31, 2020 · 0 comments

Comments

@MikuAuahDark
Copy link

For anyone who uses this script for latest love-api, the class declaration may have no parent.

if type.parenttype then
code = code .. ' : ' .. type.parenttype

Changing that line to this

if type.supertypes and type.supertypes[1] then
    code = code .. ' : ' .. type.supertypes[1]

fixes the problem.

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