fix #1050
This commit is contained in:
parent
aa69a8a09f
commit
1d5ecc0dea
2 changed files with 17 additions and 3 deletions
16
tests/generics/t1050.nim
Normal file
16
tests/generics/t1050.nim
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
discard """
|
||||
msg: "int"
|
||||
output: "4"
|
||||
"""
|
||||
|
||||
import typetraits
|
||||
|
||||
type ArrayType[T] = distinct T
|
||||
|
||||
proc arrayItem(a: ArrayType): auto =
|
||||
static: echo(name(type(a).T))
|
||||
result = (type(a).T)(4)
|
||||
|
||||
var arr: ArrayType[int]
|
||||
echo arrayItem(arr)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue