Skip to content

Commit

Permalink
test for nim-lang#17835
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed May 24, 2021
1 parent 0b289c6 commit 656e602
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/nimdoc/trunnableexamples.nim
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ when true: # bug #18054
inner1()
inner2()

when true: # bug #17835
template anyItFake*(s, pred: untyped): bool =
## Foo
runnableExamples: discard
true

proc anyItFakeMain*(n: seq[int]): bool =
result = anyItFake(n, it == 0)
# this was giving: Error: runnableExamples must appear before the first non-comment statement

runnableExamples:
block: # bug #17279
when int.sizeof == 8:
Expand Down

0 comments on commit 656e602

Please sign in to comment.