diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-06-23 01:06:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-23 10:06:36 +0200 |
commit | 511bd947d3a90a5ffedc994a45a36c4eeca63856 (patch) | |
tree | 4620ecd835918d1bbbdc4ef41cffd790356dd451 /tests | |
parent | 235d8ba069b122f34dee3ab12a34d2fba73326ce (diff) | |
download | Nim-511bd947d3a90a5ffedc994a45a36c4eeca63856.tar.gz |
fix bug in semgnrc: runnableExamples should not semcheck, even with > 1 arg (#14768)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/nimdoc/trunnableexamples.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/nimdoc/trunnableexamples.nim b/tests/nimdoc/trunnableexamples.nim index 73cfacd43..6232011cb 100644 --- a/tests/nimdoc/trunnableexamples.nim +++ b/tests/nimdoc/trunnableexamples.nim @@ -91,6 +91,16 @@ when true: # runnableExamples with rdoccmd proc fun2*() = runnableExamples "-d:foo": discard # checks that it also works inside procs + template fun3Impl(): untyped = + runnableExamples(rdoccmd="-d:foo"): + nonexistant + # bugfix: this shouldn't be semchecked when `runnableExamples` + # has more than 1 argument + discard + + proc fun3*[T]() = + fun3Impl() + when false: # future work # passing non-string-litterals (for reuse) const a = "-b:cpp" |