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
{{ message }}
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.
If you pasted this into Superpowers as it's own script, the return bar line would highlight bar because it recognizes bar is a variable that was declared within scope. This is good, I like this! (note: github does not do this aforementioned highlighting, you'll have to fire up SP and see for yourself)
However if I add private baz = 5; or some variant to the foobar class then this syntax highlighting breaks for some reason. (note: private baz; with no assignment does NOT break). However more troubling is that if I change the extends call to a class that contains a . like say Sup.Behavior it also breaks. Considering that most use cases involve extending from Sup.Behavior this is rather frustrating. As a workaround you can declare let SupBehavior = Sup.Behavior and then only extend from that and only assign to your private/public fields in awake() but that's kind of silly.
Thank you.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
So this has been a longstanding issue but it looks like no one has filed a proper bug for it.
Consider the following snippet
If you pasted this into Superpowers as it's own script, the
return bar
line would highlightbar
because it recognizesbar
is a variable that was declared within scope. This is good, I like this! (note: github does not do this aforementioned highlighting, you'll have to fire up SP and see for yourself)However if I add
private baz = 5;
or some variant to thefoobar
class then this syntax highlighting breaks for some reason. (note:private baz;
with no assignment does NOT break). However more troubling is that if I change theextends
call to a class that contains a.
like saySup.Behavior
it also breaks. Considering that most use cases involve extending from Sup.Behavior this is rather frustrating. As a workaround you can declarelet SupBehavior = Sup.Behavior
and then only extend from that and only assign to your private/public fields inawake()
but that's kind of silly.Thank you.
The text was updated successfully, but these errors were encountered: