Replies: 1 comment
-
I think the behaviour for defining literal tables changed with #1990, but if anything, you should get a warning, not have the fields be undefined, as far as I am aware. #1990 has always confused me (it is still open?) with what has changed exactly, so it may be completely unrelated. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey folks,
I have a question regarding small classes: The class annotation won't pick up any fields, when defining them as a table literal in a return statement, which I do often for smaller classes:
I also often have some metatable, which I set in the constructor, where I also set some fields.
However in both variations, the class annotation won't pick up the fields, defined in the table literal, which I believe worked in an earlier version.
Was this feature dropped or is there some new syntax to allow for those class declarations?
I know that there is a workaround, with first assigning the table to a local variable, or declare the fields via annotations, but I don't feel like I should be forced to do that.
Any suggestions would be appretiated.
Beta Was this translation helpful? Give feedback.
All reactions