mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-28 11:26:39 +00:00
fix #17615(runnableExamples silently ignored if placed after some code) (#17619)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
This commit is contained in:
11
tests/nimdoc/t17615.nim
Normal file
11
tests/nimdoc/t17615.nim
Normal file
@@ -0,0 +1,11 @@
|
||||
discard """
|
||||
cmd: "nim doc -r $file"
|
||||
errormsg: "runnableExamples must appear before the first non-comment statement"
|
||||
line: 10
|
||||
"""
|
||||
|
||||
func fn*() =
|
||||
## foo
|
||||
discard
|
||||
runnableExamples:
|
||||
assert true
|
||||
Reference in New Issue
Block a user