emerald icon indicating copy to clipboard operation
emerald copied to clipboard

Using call_mixin inside child template results in SIGSEGV

Open konradmb opened this issue 6 years ago • 0 comments

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

proc parent() {.html_templ.}=
  block content: 
    h1: "Content:"

proc templ(numItems: int) {.html_templ: parent.} =
  append content:
    html(lang="en"):
        body:
            call_mixin mySection("First section"):
                p: "Content"
            call_mixin mySection("Second section"):
                p: "More content"

Result:

SIGSEGV: Illegal storage access. (Attempt to read from nil?)

konradmb avatar Aug 13 '19 19:08 konradmb