Prepend and append regression in Nim 0.20
konradmb opened this issue · comments
konradmb commented
It's a regression in compiler that started between version 0.19 and 0.20.
This code compiled in Nim 0.20 crashes compiler:
import emerald
proc parent() {.html_templ.} =
block content:
discard
proc child() {.html_templ: parent.} =
prepend content:
h1(): "Hello!"
append content:
h1(): "Hello!"
/home/konrad/.nimble/pkgs/emerald-0.2.3/emerald/html.nim(660, 36) Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]
/home/konrad/.nimble/pkgs/emerald-0.2.3/emerald/html.nim(345, 25) Error: internal error: environment misses: :obj
Changing this line
Line 345 in 8b443ef
to
objName = ident":obj"
fixes it.
Related issue in compiler is open in nim-lang/Nim#11214