-
Notifications
You must be signed in to change notification settings - Fork 2k
TypeError: Cannot call method 'error' of undefined in 1.6.3, works fine in 1.6.2 #3053
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
Comments
the included sample is .js |
The error is being caused on this line: https://github.com/jashkenas/coffee-script/blob/0c9f0fd09975185a2cd14f1a9539d94fc7505613/src/nodes.coffee#L1840 |
edit: never mind, that doesn't make any sense. |
1841 is mine (b3ffd25) and I remember that |
Yeah, because it's a bool and doesn't have an |
@michaelficarra: You're off by one line. The stacktrace points at the change by @Nami-Doc. It's easily reproducible:
And it works as expected if an index is used:
I think it would be best to just use |
|
Ah yes,
|
The error is on |
I'm seeing this regression as well. I can confirm that downgrading to version 1.6.2 fixes the issue. |
+1 for the error. Had to downgrade to 1.6.2 |
I have a commit fixing that (870a940) but I'd rather not have a solution so hacky. |
+1 for this error. Just downgraded to 1.6.2. We have "for own property in result" in our code that is triggering it. |
A less hacky (but also less user-friendly) solution would be to just not parse the offending code (see 91b2cf6) which would look like this:
(Not really proposing this, just iterating over options ;) |
@nathanpalmer The solution is not to downgrade but to fix the code @marchaefner This seems like a good solution, since it actually shrinks down the code. Something really needs to be done about the grammar, but that's another thing on its own. |
@marchaefner @Nami-Doc: Agreed. That's what CoffeeScriptRedux does. |
@Nami-Doc -- want to send over your fix as a PR? |
I'd feel ashamed knowing a code that bad is in the code of coffeescript. I started working on this because I thought |
Oh yeah, while I'm meddling with grammar ... # rule :
'Assignable = TERMINATOR Expression'
# supposedly allowing that :
a =
5
# but also allows this
a = ; 5 but it doesn't seem to make sense to me |
Ha. Nice. Please open a new issue for that. |
compiling with 1.6.3 breaks with the error as in the title, but the same code compiles in 1.6.2, I think it has something to do with 'own' in for loops. but not sure yet.
I reproduce it but my code base is too big (and a proprietary project) so I need to work on narrowing it down
But i found someone who managed to reproduce it that also included the code:
https://groups.google.com/forum/#!topic/coffeescript/qiUWkPBJ3gM
I will update this issue soon once I get a small enough piece of code to reproduce as well.
EDIT: of course I didn't even bother to check and see that the sample in the link is a js file (which explains the "And what's your coffee ?" comment by @Nami-Doc ) sorry about that! :)
The text was updated successfully, but these errors were encountered: