mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
* add testcase for #7165 * Remove overspecific testament spec Co-authored-by: Clyybber <darkmine956@gmail.com>
16 lines
278 B
Nim
16 lines
278 B
Nim
|
|
type
|
|
Table[K, V] = object
|
|
key: K
|
|
val: V
|
|
|
|
MyTable = distinct Table[string, int]
|
|
MyTableRef = ref MyTable
|
|
|
|
proc newTable[K, V](): ref Table[K, V] = discard
|
|
|
|
proc newMyTable: MyTableRef =
|
|
MyTableRef(newTable[string, int]()) # <--- error here
|
|
|
|
discard newMyTable()
|