summary refs log tree commit diff stats
path: root/tests/run/tvarious1.nim
blob: d30d912347ba6ad9ac6167a85ecc55726a8e6525 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
discard """
  file: "tlenopenarray.nim"
  output: '''1
0'''
"""

echo len([1_000_000]) #OUT 1

type 
  TArray = array[0..3, int]
  TVector = distinct array[0..3, int]
proc `[]`(v: TVector; idx: int): int = TArray(v)[idx]
var v: TVector
echo v[2]