summary refs log tree commit diff stats
path: root/tests/init/t8314.nim
blob: 59d46eb3352d5538af7ae86a6eff14fc0381933e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
discard """
  nimout: '''
t8314.nim(8, 7) Hint: BEGIN [User]
t8314.nim(19, 7) Hint: END [User]
  '''
"""

{.hint: "BEGIN".}
proc foo(x: range[1..10]) =
  block:
    var (y,) = (x,)
    echo y
  block:
    var (_,y) = (1,x)
    echo y
  block:
    var (y,_,) = (x,1,)
    echo y
{.hint: "END".}

foo(1)