t7165.nim 278 B

12345678910111213141516
  1. type
  2. Table[K, V] = object
  3. key: K
  4. val: V
  5. MyTable = distinct Table[string, int]
  6. MyTableRef = ref MyTable
  7. proc newTable[K, V](): ref Table[K, V] = discard
  8. proc newMyTable: MyTableRef =
  9. MyTableRef(newTable[string, int]()) # <--- error here
  10. discard newMyTable()