summary refs log tree commit diff stats
path: root/nimsuggest/tests/tuse_structure.nim
diff options
context:
space:
mode:
Diffstat (limited to 'nimsuggest/tests/tuse_structure.nim')
-rw-r--r--nimsuggest/tests/tuse_structure.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/nimsuggest/tests/tuse_structure.nim b/nimsuggest/tests/tuse_structure.nim
new file mode 100644
index 000000000..f65ab9060
--- /dev/null
+++ b/nimsuggest/tests/tuse_structure.nim
@@ -0,0 +1,15 @@
+# tests for use and structures
+
+type
+  Foo* = ref object of RootObj
+    bar*: string
+
+proc test(f: Foo) =
+  echo f.#[!]#bar
+
+discard """
+$nimsuggest --tester $file
+>use $1
+def	skField	tuse_structure.Foo.bar	string	$file	5	4	""	100
+use	skField	tuse_structure.Foo.bar	string	$file	8	9	""	100
+"""