summary refs log blame commit diff stats
path: root/tests/init/t8314.nim
blob: 47c8480c299f01d7058c18caae8afc5a0d8c4087 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

             

                                   
     





           















                           
discard """
  nimout: '''
t8314.nim(14, 7) Hint: BEGIN [User]
t8314.nim(25, 7) Hint: END [User]
  '''

output: '''
1
1
1
'''
"""

{.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)