fix #14846; add macros.extractDocCommentsAndRunnables (#14849)

* fix #14846; add macros.extractDocCommentsAndRunnables

* fixup

* update tests

* address comment
This commit is contained in:
Timothee Cour 2020-07-01 00:26:23 -07:00 • committed by GitHub
commit 2867a33ebc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 98 additions and 3 deletions

View file

@ -343,6 +343,20 @@ when true: # issue #14473
toSeq([1,2])
echo doit() # using doAssert or similar to avoid echo would "hide" the original bug
when true: # issue #14846
import asyncdispatch
proc asyncFun1*(): Future[int] {.async.} =
## ok1
result = 1
proc asyncFun2*() {.async.} = discard
proc asyncFun3*() {.async.} =
runnableExamples:
discard
## ok1
discard
## should be out
discard
when true:
template testNimDocTrailingExample*() =
# this must be last entry in this file, it checks against a bug (that got fixed)