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
classbarextendsbazthenx=1# Works without a function callclassbarthenx=1# Works without a function callclassbarextendsbaz# Works without a function callx=1funcclassbarextendsbaz# Works when there's an prototype propertry assignment before other codex:1x=1funcclassbarextendsbaz# Works with classes that doesn't have any contentfuncclassbar# Works with an indented body instead of `then`, but only when the class doesn't extend anythingx=1
func (classbarextendsbazthenx=1) # Works with `()` wrapping the class.
The cases where I get parsing errors seems to be those two:
Passing a class with then as an argument to a function.
Passing a class that extends another class and starts with regular code (and not prototype property assignment) as an argument to a function.
If anyone else is experiencing that and needs a quick fix, here's what I ended up doing in the meanwhile:
funcclassfooextendsbarBUGFIX:1# See https://github.com/jashkenas/coffee-script/issues/1813# ...
The text was updated successfully, but these errors were encountered:
Those doesn't work (fails with
UNEXPECTED 'INDENT'
):While those does:
The cases where I get parsing errors seems to be those two:
then
as an argument to a function.If anyone else is experiencing that and needs a quick fix, here's what I ended up doing in the meanwhile:
The text was updated successfully, but these errors were encountered: