jashkenas/coffee-script — Issue #1962: Resolve non-method super to immediate ancestor constructor
Author: jed
Created: 2011-12-22 15:19:10+00:00
State: open

When used outside of a class method like this:

```coffeescript
class Dog extends Animal
constructor: super
```

`super` currently throws the error `CANNOT CALL METHOD 'PUSH' OF UNDEFINED`.

Since the constructor can be considered as the default function in a class, perhaps it would make sense to have it resolve to the constructor of the immediate ancestor, which in this case is `Animal`.