Improve the source location information when tofu reports a type checking error on a parameter
we should point at the specific parameter instead of the whole template.
GITHUB_BREAKING_CHANGES=none
@@ -935,7 +935,7 @@ public class RenderVisitor extends AbstractSoyNodeVisitor<Void> {
/** Check that the value matches the given param type. */
private void checkValueType(TemplateParam param, SoyValue value, TemplateNode node) {
- if (!TofuTypeChecks.isInstance(param.type(), value, node.getSourceLocation())) {
+ if (!TofuTypeChecks.isInstance(param.type(), value, param.nameLocation())) {
// should this be a soydataexception?
throw RenderException.createWithSource(
"Parameter type mismatch: attempt to bind value '"
