You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Hi @Liquidsoul
Thanks for the help, but unfortunately that doesn't seem to work, either, for my use case - since it seems that the map tag does not keep the original type of what it's mapping over.
So for example, if I write: {% map myType.storedVariables into myArray %}{{ maploop.item }}{% endmap %}
Originally, the type of item is a Sourcery Variable type, but after being mapped it gets transformed into some other type and some functions no longer work, such as isArray.
Perhaps I'm just doing the mapping wrong? I tried using just maploop.item instead of {{ maploop.item }} but it gets parsed as a string literal.
@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: