Skip to content

"for own ... in" throws unexpected exception #3152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gustavderdrache opened this issue Sep 4, 2013 · 4 comments
Closed

"for own ... in" throws unexpected exception #3152

gustavderdrache opened this issue Sep 4, 2013 · 4 comments

Comments

@gustavderdrache
Copy link

> coffee --version
CoffeeScript version 1.6.3
> coffee -e 'x for own x in y'
TypeError: Cannot call method 'error' of undefined
    at new For (/usr/lib/node_modules/coffee-script/lib/coffee-script/nodes.js:2588:20)
    [stack trace omitted but available on request]

Also reproducible on the website, which gives the error "this.index is undefined".

@michaelficarra
Copy link
Collaborator

Just so you're aware of why it's an issue, for-own-in is not a thing. You're probably looking for for-own-of. But there should be a better error than that.

@gustavderdrache
Copy link
Author

Yeah, sorry. I know it's a syntax error, but it's probably one that should be noted by the compiler rather than cause unexpected exceptions.

@vendethiel
Copy link
Collaborator

=> #3053

@michaelficarra
Copy link
Collaborator

Ah, thank you. I thought we already had an issue for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants