Can not infer type in child class #2462
Unanswered
Luke100000
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In this minimal example
Plane.test is no longer defined:
Can not infer type. Lua Diagnostics.(no-unknown)
Why? Plane.test is a number, because its inherited.
I can redefine my fields in every child class but that escalates in copy pasta.
What am I missing?
And related to the overall issue, how is self defined? Why is
init2
not working (Fields cannot be injected into the reference of "Plane" for "test2".
), butinit1
is fine? Theoretically, it should only by syntactic sugar.Can someone link me an example of OOP which is generally the most approved way to do so?
Beta Was this translation helpful? Give feedback.
All reactions