jashkenas/coffee-script — Issue #2153: issue with static context inside a nested class
Author: humanchimp
Created: 2012-02-28 02:54:01+00:00
State: open

Hi all —

It appears that we stumbled upon a bug today. The problem arises when using `extends`, nested classes, and the static context. Consider that following code, that will compile just fine in pre 1.2 coffeescript

```coffeescript
class Outer extends Base
class Inner
@doStuff()
```

Now, in CoffeeScript 1.2, this will throw the error `Cannot call method "push" of undefined.`

Removing either `@doStuff()` or `extends` will compile fine, as will "denesting" the classes.