emerald icon indicating copy to clipboard operation
emerald copied to clipboard

Can't call parent template vars from inside mixin

Open konradmb opened this issue 4 years ago • 0 comments

import emerald
proc mySection() {.html_mixin.} =
    section:
        h1: title
        put mixin_content()

proc parent(title: string) {.html_templ.} =
    block content:
        h1: title

proc templ(numItems: int) {.html_templ: parent.} =
    append content:
        call_mixin mySection():
            p: "Content"

Result:

../emerald/src/emerald/html.nim(343, 25) Error: expression ':obj427134' has no type (or is ambiguous)

konradmb avatar Aug 14 '19 01:08 konradmb