about summary refs log tree commit diff stats
path: root/js/games/nluqo.github.io/~bh/ss-pics/parse4.jpg
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-12-22 13:47:06 -0500
committerelioat <elioat@tilde.institute>2024-12-22 13:47:06 -0500
commit5caf1654f4bd447c47fd690eab53e39a21978c23 (patch)
treefe1def3c40eb586d34cd71288f57e5b7fb29af7a /js/games/nluqo.github.io/~bh/ss-pics/parse4.jpg
parentcf1789eb681a648b164c69e337ac622251423e85 (diff)
downloadtour-5caf1654f4bd447c47fd690eab53e39a21978c23.tar.gz
*
Diffstat (limited to 'js/games/nluqo.github.io/~bh/ss-pics/parse4.jpg')
0 files changed, 0 insertions, 0 deletions
ion' href='/ahoang/Nim/blame/tests/pragmas/tused.nim?h=devel&id=dd8cbf5fca7becf43b5cec07ecf7e579308e2e7a'>^
f250c30b9 ^











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
           

             
                                                                                                                                   

                

   









                                  




                                  











                                                   
discard """
  nimout: '''
compile start
tused.nim(15, 8) Hint: 'tused.echoSub(a: int, b: int)[declared in tused.nim(15, 7)]' is declared but not used [XDeclaredButNotUsed]
compile end'''
  output: "8\n8"
"""

static:
  echo "compile start"

template implementArithOpsOld(T) =
  proc echoAdd(a, b: T) =
    echo a + b
  proc echoSub(a, b: T) =
    echo a - b

template implementArithOpsNew(T) =
  proc echoAdd(a, b: T) {.used.} =
    echo a + b
  proc echoSub(a, b: T) {.used.} =
    echo a - b

block:
  # should produce warning for the unused 'echoSub'
  implementArithOpsOld(int)
  echoAdd 3, 5

block:
  # no warning produced for the unused 'echoSub'
  implementArithOpsNew(int)
  echoAdd 3, 5

static:
  echo "compile end"