Raise compilation error for string interpolation in group name

This commit is contained in:
Michael Miller 2022-01-10 21:11:28 -07:00
parent 941b91fef4
commit aabec269cb
No known key found for this signature in database
GPG key ID: AC78B32D30CE34A2

View file

@ -130,9 +130,10 @@ module Spectator::DSL
what.resolve?.is_a?(TypeNode) %}
{{what.symbolize}}
{% elsif what.is_a?(StringLiteral) ||
what.is_a?(StringInterpolation) ||
what.is_a?(NilLiteral) %}
{{what}}
{% elsif what.is_a?(StringInterpolation) %}
{% raise "String interpolation isn't supported for example group names" %}
{% else %}
{{what.stringify}}
{% end %}