Skip to content

Conversation

ringabout
Copy link
Member

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant