jashkenas/coffee-script — Issue #1813: Passing a class with a body to a function doesn't work as expected
Author: shesek
Created: 2011-10-29 23:24:10+00:00
State: open

Those doesn't work:
```coffee
func class bar extends baz then x = 1
func class bar then x = 1
func class bar extends baz
x = 1
```

While those does:
```coffee
class bar extends baz then x = 1 # Works without a function call
class bar then x = 1 # Works without a function call
class bar extends baz # Works without a function call
x = 1
func class bar extends baz # Works when there's an prototype propertry assignment before other code
x: 1
x = 1
func class bar # Works with an indented body instead of `then`, but only when the class doesn't extend anything
x = 1
```

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 propert assignment) as an argument to a function.