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

table types do not accept userdata as keys #59

Open
hishamhm opened this issue Mar 2, 2015 · 1 comment
Open

table types do not accept userdata as keys #59

hishamhm opened this issue Mar 2, 2015 · 1 comment

Comments

@hishamhm
Copy link
Contributor

hishamhm commented Mar 2, 2015

I tried to declare a table of type { file : {string} } and got a syntax error.

@andremm
Copy link
Owner

andremm commented Mar 2, 2015

I tried to declare a table of type { file : {string} } and got a syntax error.

This table type is not valid in Typed Lua. The type of the keys in a table type can only be literal types, base types, or the top type value.

In this case, you need to use { value : {string} }.

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

3 participants