summary refs log tree commit diff stats
path: root/nimdoc/testproject/testproject.nim
diff options
context:
space:
mode:
Diffstat (limited to 'nimdoc/testproject/testproject.nim')
-rw-r--r--nimdoc/testproject/testproject.nim37
1 files changed, 37 insertions, 0 deletions
diff --git a/nimdoc/testproject/testproject.nim b/nimdoc/testproject/testproject.nim
index 57960c69f..383c4c827 100644
--- a/nimdoc/testproject/testproject.nim
+++ b/nimdoc/testproject/testproject.nim
@@ -1,3 +1,15 @@
+## Basic usage
+## ===========
+##
+## Encoding data
+## -------------
+##
+## Apart from strings you can also encode lists of integers or characters:
+
+## Decoding data
+## -------------
+##
+
 
 import subdir / subdir_b / utils
 
@@ -42,6 +54,11 @@ proc buzz*[T](a, b: T): T {.deprecated: "since v0.20".} =
 type
   FooBuzz* {.deprecated: "FooBuzz msg".} = int
 
+using f: FooBuzz
+
+proc bar*(f) = # `f` should be expanded to `f: FooBuzz`
+  discard
+
 import std/macros
 
 var aVariable*: array[1, int]
@@ -383,3 +400,23 @@ when true: # issue #15184
     ##
     ##  There is no block quote after blank lines at the beginning.
   discard
+
+type T19396* = object # bug #19396
+   a*: int
+   b: float
+
+template somePragma*() {.pragma.}
+  ## Just some annotation
+
+type # bug #21483
+   MyObject* = object
+      someString*: string ## This is a string
+      annotated* {.somePragma.}: string ## This is an annotated string
+
+type
+  AnotherObject* = object
+    case x*: bool
+    of true:
+      y*: proc (x: string)
+    of false:
+      hidden: string