summary refs log tree commit diff stats
path: root/tests/template/mcan_access_hidden_field.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/template/mcan_access_hidden_field.nim')
-rw-r--r--tests/template/mcan_access_hidden_field.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/template/mcan_access_hidden_field.nim b/tests/template/mcan_access_hidden_field.nim
new file mode 100644
index 000000000..bf3592701
--- /dev/null
+++ b/tests/template/mcan_access_hidden_field.nim
@@ -0,0 +1,9 @@
+
+type
+  Foo* = object
+    fooa, foob: int
+
+proc createFoo*(a, b: int): Foo = Foo(fooa: a, foob: b)
+
+template geta*(f: Foo): expr = f.fooa
+