Skip to content
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

added test multiple subexpressions in a hash with context #768

Closed
wants to merge 1 commit into from

Conversation

MarkoZabcic
Copy link
Contributor

Here is a failing test for issue #767

@kpdecker
Copy link
Collaborator

Thank you so much for the failing test case. This makes things a lot easier :)

We'll look into it and see what might be going on.

@kpdecker
Copy link
Collaborator

This appears to be a stack variable overwrite issue.

$ node
> console.log(require('./lib').precompile('{{input aria-label=(t item.field) placeholder=(t item.placeholder)}}'))
{"compiler":[5,">= 2.0.0"],"main":function(depth0,helpers,partials,data) {
  var stack1, stack2, helper, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
  stack1 = (helper = helpers.t || (depth0 && depth0.t) || helperMissing,helper.call(depth0, ((stack1 = (depth0 && depth0.item)),stack1 == null || stack1 === false ? stack1 : stack1.field), {"name":"t","hash":{},"data":data}));
  stack2 = (helper = helpers.t || (depth0 && depth0.t) || helperMissing,helper.call(depth0, ((stack1 = (depth0 && depth0.item)),stack1 == null || stack1 === false ? stack1 : stack1.placeholder), {"name":"t","hash":{},"data":data}));
  return escapeExpression((helper = helpers.input || (depth0 && depth0.input) || helperMissing,helper.call(depth0, {"name":"input","hash":{
    'placeholder': (stack2),
    'aria-label': (stack1)
  },"data":data})));
  },"useData":true}

This is failing under master so it appears that we have not resolved all of the stack variable issues.

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

Successfully merging this pull request may close these issues.

2 participants