LukeK
LukeK

Reputation: 125

Unexpected Indent error coffeescript

I get an unexpected indent error when I try compiling this code:

class permanentItem extend Item 
    add: ->
        super()

    remove: ->
        super()

It is on the second line add: ->. I have tried commenting that and it still gives me the same error on remove: ->. Any ideas?

Upvotes: 1

Views: 242

Answers (1)

dfsq
dfsq

Reputation: 193291

You have a typo in your code. It should be extends instead of extend:

class permanentItem extends Item 
    add: ->
        super()

    remove: ->
        super()

Upvotes: 1

Related Questions