fix #15916 (#15917) [backport]

* fix #15916

* add testcase for #15916

* add comments
This commit is contained in:
flywind 2020-11-12 16:31:35 +08:00 • committed by GitHub
commit 402df0b061
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 2 deletions

16
tests/nimdoc/t15916.nim Normal file
View file

@ -0,0 +1,16 @@
discard """
cmd: "nim doc --hints:off $file"
action: "compile"
joinable: false
"""
type
Test* = object
id: int
proc initTest*(id: int): Test =
result.id = id
proc hello*() =
runnableExamples:
discard