titems.nim 354 B

1234567891011121314
  1. # issue #22984
  2. # import sets # <<-- Uncomment this to make the error go away
  3. import mitems
  4. ## The generic implementation
  5. var grp: EntGroup[Fruit] = initEntGroup[Fruit]()
  6. doAssert $get(grp) == "Fruit(20)" ## Errors here
  7. ## This works though (Non-generic)
  8. var fruitGroup: FruitGroup = initFruitGroup()
  9. doAssert $getNoGeneric(fruitGroup) == "Fruit(20)"