-
-
Notifications
You must be signed in to change notification settings - Fork 391
Description
In languages like Java, you have the keyword final to indicate that a function should NOT be overridden. There doesn't seem to be any annotation like that yet. It should give a warning (or error?) if you try to override the function. Additionally, completion for function MyClass: could avoid suggesting anything with @final? You'd still be able to call it anywhere, just not override it if its now final.
(Maybe @final could also work on variables? Pretty much working the same way, just "don't override/set this but still be able to read it")
(Unrelated but I was thinking about ---@override to mark something as "you should override this and not call this" but it wouldn't be able to warn since your internal code needs to call it, so I'm not sure. Might just be good to have anyway, not as a warning but a tooltip thing.)