summary refs log tree commit diff stats
path: root/tests/generics/tarray_with_somenumber.nim
blob: 0bf2537a148f73d6e626bd8f4858fbcffd24d952 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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)