* add testcase for #7165 * Remove overspecific testament spec Co-authored-by: Clyybber <darkmine956@gmail.com>
This commit is contained in:
parent
db9ab2a4c0
commit
6c83eb48c2
1 changed files with 15 additions and 0 deletions
15
tests/distinct/t7165.nim
Normal file
15
tests/distinct/t7165.nim
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
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()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue