fix bug in semgnrc: runnableExamples should not semcheck, even with > 1 arg (#14768)

This commit is contained in:
Timothee Cour 2020-06-23 01:06:36 -07:00 • committed by GitHub
commit 511bd947d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -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"