summary refs log tree commit diff stats
path: root/nimdoc/testproject/subdir
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-07-27 10:50:59 -0700
committerGitHub <noreply@github.com>2021-07-27 19:50:59 +0200
commit8d2f6bba3a491bc93677da9590397346e63c2bb2 (patch)
tree91e473ab8a5c2c4fc7ebe54f0d68a835cec655ad /nimdoc/testproject/subdir
parent4920b06973e69c525405ff3147dc8a823a4c3c58 (diff)
downloadNim-8d2f6bba3a491bc93677da9590397346e63c2bb2.tar.gz
support same-line doc comments in routines (#18595)
* support same-line comments in routines
* remove assert as per review comment
Diffstat (limited to 'nimdoc/testproject/subdir')
-rw-r--r--nimdoc/testproject/subdir/subdir_b/utils.nim17
1 files changed, 17 insertions, 0 deletions
diff --git a/nimdoc/testproject/subdir/subdir_b/utils.nim b/nimdoc/testproject/subdir/subdir_b/utils.nim
index 4e3aa1f10..37c91dd3c 100644
--- a/nimdoc/testproject/subdir/subdir_b/utils.nim
+++ b/nimdoc/testproject/subdir/subdir_b/utils.nim
@@ -31,6 +31,23 @@ proc someType*(): SomeType =
   ## constructor.
   SomeType(2)
 
+
+proc fn2*() = discard ## comment
+proc fn3*(): auto = 1 ## comment
+proc fn4*(): auto = 2 * 3 + 4 ## comment
+proc fn5*() ## comment
+proc fn5*() = discard
+proc fn6*() =
+  ## comment
+proc fn7*() =
+  ## comment
+  discard
+proc fn8*(): auto =
+  ## comment
+  1+1
+func fn9*(a: int): int = 42  ## comment
+func fn10*(a: int): int = a  ## comment
+
 # bug #9235
 
 template aEnum*(): untyped =