Macro arguments sometimes would need type info #512
-
|
Something I encountered multiple times when creating {% macro test(title = None) %}
{% if let Some(title) = title %}
Title: {{title}}
{% endif %}
{% endmacro %}The following case works, since when explicitly supplying {% call test(title = Some("My awesome title!")) %}{% endcall %}However when using the default value of {% call test() %}{% endcall %}I tried explicitly specifying the generic parameter, like: Is there something I've been missing on this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
You tried with the not-yet released version or with the last released version? If the current not-yet released version doesn't allow you to do it, then we should add support for it. |
Beta Was this translation helpful? Give feedback.
The first for sure. The second would be up to debate. What about opening issues for both of them? Like that we can decide whether or not we want the second one.