Nim icon indicating copy to clipboard operation
Nim copied to clipboard

wip: implemements `@`

Open ringabout opened this issue 7 months ago • 0 comments

It seems that type inference is not good enough for empty array in templates. I'm struggling with

import std/tables

template accResult() =
  var s = newTable[int, seq[int]]()

  var x = 2
  discard mgetOrPut(s, x, @[])

  # var x = newSeq[int]()
  # x = @[]

proc splitWhitespace*() =
  accResult()

splitWhitespace()

ringabout avatar May 19 '25 14:05 ringabout