summary refs log tree commit diff stats
path: root/tests/fields/timplicitfieldswithpartial.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fields/timplicitfieldswithpartial.nim')
-rw-r--r--tests/fields/timplicitfieldswithpartial.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/fields/timplicitfieldswithpartial.nim b/tests/fields/timplicitfieldswithpartial.nim
new file mode 100644
index 000000000..ab50f4276
--- /dev/null
+++ b/tests/fields/timplicitfieldswithpartial.nim
@@ -0,0 +1,19 @@
+discard """
+  out: '''(foo0: 38, other1: string here)
+43'''
+"""
+
+type
+  Base = ref object of RootObj
+  Foo {.partial.} = ref object of Base
+
+proc my(f: Foo) =
+  #var f.next = f
+  let f.foo = 38
+  let f.other = "string here"
+  echo f[]
+  echo f.foo0 + 5
+
+var g: Foo
+new(g)
+my(g)