CoffeeScriptRedux icon indicating copy to clipboard operation
CoffeeScriptRedux copied to clipboard

super keyword appears to be breaking the CoffeeScriptRedux

Open bbuck opened this issue 12 years ago • 1 comments

If this had already been reported or fixed, sorry I didn't find it in the search. But using the sample site (not sure how far behind it lags) the examples from coffeescript.org that feature classes and calls to "super" are broken.

class Animal
  constructor: (@name) ->

  move: (meters) ->
    alert @name + " moved #{meters}m."

class Snake extends Animal
  move: ->
    alert "Slithering..."
    super 5

class Horse extends Animal
  move: ->
    alert "Galloping..."
    super 45

sam = new Snake "Sammy the Python"
tom = new Horse "Tommy the Palomino"

sam.move()
tom.move()

Is the example in question, commenting out the super lines fixes the indentation error reported.

Syntax error on line 4, column 2: unexpected '(INDENT)' (\uEFEF)
1 : class Animal 
2 : constructor: (@name) -> 
3 : 
4 : move: (meters) -> 
^ :~~^
5 : alert @name + " moved #{meters}m." 
6 : 
7 : class Snake extends Animal

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/825341-super-keyword-appears-to-be-breaking-the-coffeescriptredux?utm_campaign=plugin&utm_content=tracker%2F33145&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F33145&utm_medium=issues&utm_source=github).

bbuck avatar Jan 30 '13 19:01 bbuck

Which is kinda expected since it's not done. look at the progress

vendethiel avatar Jan 30 '13 19:01 vendethiel