summary refs log tree commit diff stats
path: root/tests/generics/mdotlookup.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-07-09 21:10:11 +0200
committerAraq <rumpf_a@web.de>2014-07-09 21:10:11 +0200
commiteb99c27bd0cf248362b827c8a12bc6543f1f89c5 (patch)
treefbbab8ceff672464a9d874bf37e06e213cc66998 /tests/generics/mdotlookup.nim
parentd80d8aa74d4e7471c262d95aedbe0971a1b2672a (diff)
downloadNim-eb99c27bd0cf248362b827c8a12bc6543f1f89c5.tar.gz
fixes #1011
Diffstat (limited to 'tests/generics/mdotlookup.nim')
-rw-r--r--tests/generics/mdotlookup.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/generics/mdotlookup.nim b/tests/generics/mdotlookup.nim
new file mode 100644
index 000000000..7a5e0ccbf
--- /dev/null
+++ b/tests/generics/mdotlookup.nim
@@ -0,0 +1,8 @@
+proc baz(o: any): int = 5 # if bar is exported, it works
+
+type MyObj = object
+  x: int
+
+proc foo*(b: any) =
+  var o: MyObj
+  echo b.baz, " ", o.x.baz, " ", b.baz()