fixes #1655
This commit is contained in:
parent
8be177627a
commit
e9619d7278
3 changed files with 30 additions and 13 deletions
15
tests/metatype/tautonotgeneric.nim
Normal file
15
tests/metatype/tautonotgeneric.nim
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue