diff --git a/common/jinja/runtime.cpp b/common/jinja/runtime.cpp index f81d98d..5a089d3 100644 --- a/common/jinja/runtime.cpp +++ b/common/jinja/runtime.cpp @@ -779,6 +779,12 @@ value member_expression::execute_impl(context & ctx) { } else { property = this->property->execute(ctx); } + } else if (is_stmt(this->property)) { + // syntax: obj.index + property = mk_val(cast_stmt(this->property)->val); + if (property->as_int() < 0) { + throw std::runtime_error("Static member property cannot be negative"); + } } else { // syntax: obj.prop if (!is_stmt(this->property)) {