summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-02-24 13:02:36 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-02-24 13:02:36 +0100
commitf8914cc3b002916c2b9a9cc548eae610d14ef666 (patch)
treeb5ab9dade22a60973e022907c12d857755d45a52 /tests
parent46f33515d7ec32215122547bce535e4c91894da3 (diff)
downloadNim-f8914cc3b002916c2b9a9cc548eae610d14ef666.tar.gz
fixes a multimethod regression
Diffstat (limited to 'tests')
-rw-r--r--tests/metatype/tautonotgeneric.nim13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/metatype/tautonotgeneric.nim b/tests/metatype/tautonotgeneric.nim
index a55ae488e..f0d6932f9 100644
--- a/tests/metatype/tautonotgeneric.nim
+++ b/tests/metatype/tautonotgeneric.nim
@@ -1,15 +1,24 @@
 discard """
-  output: "wof!"
+  output: '''wof!
+wof!'''
 """
 
 # bug #1659
 type Animal = ref object {.inheritable.}
 type Dog = ref object of Animal
 
-method say(a: Animal): auto = "wat!"
+method say(a: Animal): auto {.base.} = "wat!"
 method say(a: Dog): auto = "wof!"
 
 proc saySomething(a: Animal): auto = a.say()
 
+
+method ec(a: Animal): auto {.base.} = echo "wat!"
+method ec(a: Dog): auto = echo "wof!"
+
+proc ech(a: Animal): auto = a.ec()
+
+
 var a = Dog()
 echo saySomething(a)
+ech a