-
Notifications
You must be signed in to change notification settings - Fork 58
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
Calling macro with a parameter invoking a filter crashes #76
Comments
Hi @Liquidsoul So for example, if I write: Originally, the type of Perhaps I'm just doing the mapping wrong? I tried using just |
You can always use the I'm curious though, how does Stencil do this? (ping @kylef) Is it this line? VariableNode(variable: resolvable).render(context) https://github.com/kylef/Stencil/blob/master/Sources/FilterTag.swift#L31 |
@djbe wrapping in variable node will stringify the result but current tests expect the type of arguments to be preserved. So just compiling arguments as filter expressions should be sufficient. |
So I have a macro
{% macro someMacro someParameter %}
And when I attempt to invoke it like this:
{% call someMacro myType.storedVariables|annotated:"someAnnotation" %}
I get this fatal exception:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SourceryRuntime.Struct 0x7f94a2e1a5a0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key storedVariables|annotated:"json".'
Calling the macro without the filter on storedVariables works just fine:
{% call someMacro myType.storedVariables %}
The text was updated successfully, but these errors were encountered: