You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no way to express that a function has to be implemented by the child class.
I believe a way to declare abstract classes/members similar to how it's done in Java/C# would be beneficial.
Potential syntax:
---@class AbstractClass
---@field abstract print: fun()
local class = {}
---Alternatively, declare an abstract function in a meta file
---@abstract
---@param sound string
class.produce_sound(sound)
end
---error: members of AbstractClass not implemented
---@class Child: AbstractClass
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently there is no way to express that a function has to be implemented by the child class.
I believe a way to declare abstract classes/members similar to how it's done in Java/C# would be beneficial.
Potential syntax:
Beta Was this translation helpful? Give feedback.
All reactions