That's obviously supposed to work and it's a bug when using methods in
combination with generics. Without generics it works fine:
type
Console* = ref object of RootObj
ViewportConsole* = ref object of Console
method draw*(self: Console, engine: string) =
echo "Ignoring a Console..."
method draw*(self: ViewportConsole, engine: string) =
echo "Drawing a ViewportConsole on ", engine, "..."
var consoles: seq[Console] = @[]
consoles.add(new(Console))
consoles.add(new(ViewportConsole))
for console in consoles:
console.draw("blah blah")
I will open a bug report.