fixes #2304
This commit is contained in:
parent
ea5217c9fc
commit
13cdad8819
4 changed files with 22 additions and 5 deletions
11
tests/generics/tarray_with_somenumber.nim
Normal file
11
tests/generics/tarray_with_somenumber.nim
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
discard """
|
||||
output: '''@[0.9, 0.1]'''
|
||||
"""
|
||||
|
||||
# bug #2304
|
||||
|
||||
type TV2*[T:SomeNumber] = array[0..1, T]
|
||||
proc newV2T*[T](x, y: T=0): TV2[T] = [x, y]
|
||||
|
||||
let x = newV2T[float](0.9, 0.1)
|
||||
echo(@x)
|
||||
Loading…
Add table
Add a link
Reference in a new issue