summary refs log tree commit diff stats
path: root/tests/tools
Commit message (Expand)AuthorAgeFilesLines
* change `--hint[X] => --hint:X` in nim repo (avoids shell quoting issues) (#18...Timothee Cour2021-05-261-1/+1
* add astmsgs; add `declared in` msg for usage lint errors (#17961)Timothee Cour2021-05-081-4/+4
* close #14806 (#17626)flywind2021-04-034-0/+12
* new feature: --staticBoundChecks:on to enforce static array index checking (#...Andreas Rumpf2020-03-181-3/+3
* fixes #12885 [backport] (#12895)Andreas Rumpf2019-12-132-2/+14
* fixes #11903 (#11908)Arne Döring2019-08-311-0/+22
* fixes #12029; finish the 'unused import' feature (#12064)Andreas Rumpf2019-08-272-1/+4
* fixes #11809Andreas Rumpf2019-08-081-0/+27
* fixes linter regressionsAraq2019-07-101-2/+12
* nim styleChecker: implemented all the missing features (bugfix)Araq2019-07-101-0/+30
nim?h=devel&id=566ee874cde6defb128cdf9df124c45146187129'>^
0d8942d45 ^







000b8afd2 ^
0d8942d45 ^










1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

               


  
 

    



           
                          









                             







                    
                           










                                                       
discard """
  output: '''hi
hi
1
hi
2
B
A'''
"""

# bug #1742

template test(): untyped =
    let a = 0
    defer: echo "hi"
    a

let i = test()

import strutils
let x = try: parseInt("133a")
        except: -1
        finally: echo "hi"


template atFuncEnd =
  defer:
    echo "A"
  defer:
    echo "B"

template testB(): untyped =
    let a = 0
    defer: echo "hi" # Delete this line to make it work
    a

proc main =
  atFuncEnd()
  echo 1
  let i = testB()
  echo 2

main()