mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
* add testcase for #6060 * Remove overspecific testament spec Co-authored-by: Clyybber <darkmine956@gmail.com>
12 lines
260 B
Nim
12 lines
260 B
Nim
import tables
|
|
|
|
type MyTab[A,B] = distinct TableRef[A,B]
|
|
|
|
proc `$`[A,B](t: MyTab[A,B]): string =
|
|
"My special table " & $TableRef[A,B](t)
|
|
|
|
proc create[A,B](): MyTab[A,B] = MyTab(newTable[A,B]())
|
|
|
|
var a = create[int,int]()
|
|
doAssert $a == "My special table {:}"
|