This commit is contained in:
Araq 2014-12-17 01:11:30 +01:00
commit e9619d7278
3 changed files with 30 additions and 13 deletions

View file

@ -0,0 +1,15 @@
discard """
output: "wof!"
"""
# bug #1659
type Animal = ref object {.inheritable.}
type Dog = ref object of Animal
method say(a: Animal): auto = "wat!"
method say(a: Dog): auto = "wof!"
proc saySomething(a: Animal): auto = a.say()
var a = Dog()
echo saySomething(a)