Open timotheecour opened 4 years ago
see whether we can overload by nimvm vs rt:
proc fn(): int {.nimvm.} = 1
proc fn(): int {.nimvm:off.} = 2
proc main=
doAssert fn() == 2
static: doAssert fn() == 1
# constant folding that is necessary for correctness of semantic pass:
if callee.magic != mNone and callee.magic in ctfeWhitelist and n.typ != nil:
D20200524T194136
wondering whether https://github.com/nim-lang/Nim/pull/13038 would help...
links
[Meta] Generics/Static early symbol resolution · Issue #8677 · nim-lang/Nim
example where my previous proposed
if nimct:
doens't work:https://github.com/nim-lang/Nim/pull/13038#issuecomment-570976718
whereas this works: