summary refs log tree commit diff stats
path: root/tests/rodfiles/bmethods.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-10-27 23:25:34 +0200
committerAraq <rumpf_a@web.de>2011-10-27 23:25:34 +0200
commit2d54b850894004ad8116f804b6c0c2f013a5b7a2 (patch)
tree70d4112f8e67bdf5e7f08ab538a5de7e0993c2d7 /tests/rodfiles/bmethods.nim
parent5e5e4abfeee16bcacf659d35745d456586cb37e5 (diff)
downloadNim-2d54b850894004ad8116f804b6c0c2f013a5b7a2.tar.gz
compilation cache: tests now part of test suite
Diffstat (limited to 'tests/rodfiles/bmethods.nim')
-rw-r--r--tests/rodfiles/bmethods.nim30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/rodfiles/bmethods.nim b/tests/rodfiles/bmethods.nim
new file mode 100644
index 000000000..f665efa09
--- /dev/null
+++ b/tests/rodfiles/bmethods.nim
@@ -0,0 +1,30 @@
+discard """
+  output: '''
+derived class
+base class
+'''
+"""
+
+import amethods
+
+
+type
+  TDerivedClass* = object of TBaseClass
+
+proc newDerivedClass: ref TDerivedClass =
+  new result
+  
+method echoType*(x: ref TDerivedClass) =
+  echo "derived class"
+
+var b, d: ref TBaseClass
+
+b = newBaseClass()
+d = newDerivedClass()
+
+#b.echoType()
+#d.echoType()
+
+echoAlias d
+echoAlias b
+