ember-script icon indicating copy to clipboard operation
ember-script copied to clipboard

Current #HEAD bad compiles @foo

Open trunda opened this issue 10 years ago • 4 comments

Hi there, current head compiles this:

@bar.contains(@foo) to get$(this, 'bar').contains(this.foo);. It should be get$(this, 'bar').contains(get$(this, 'foo'));

trunda avatar Mar 09 '14 17:03 trunda

I guess it is because commit 2134700c2d, where is added this code.

trunda avatar Mar 09 '14 18:03 trunda

Looks like it could be from this line: https://github.com/ghempton/ember-script/commit/2134700c2d#diff-097a81dfc786f3a3aa0d594b496ea92bR217. That is probably due to a bad merge from CoffeeScriptRedux. I don't have time to look at this until later, do you have a minute to see if that fixes it?

ghempton avatar Mar 09 '14 18:03 ghempton

It actually appears to be this line: https://github.com/ghempton/ember-script/commit/6b0fa13e6b6aa057b6344295476a9e3b02811e75#diff-097a81dfc786f3a3aa0d594b496ea92bR647

If I remove that /contextVar it starts working properly again. I don't have enough pegjs expertise to try to write a test case or anything, but hopefully this helps.

BenV avatar Mar 11 '14 18:03 BenV

Do you have time to create a PR that removes that line?

ghempton avatar Mar 11 '14 18:03 ghempton