andreaferretti / interfaced

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"recursive call" error where it shouldn't be?

dawkot opened this issue · comments

import interfaced

createInterface Damagable:
    proc applyDamage(self: Damagable, damage: int)

type Obj = ref object
proc applyDamage(self: Obj, damage: int) = discard

let x: Damagable = toDamagable Obj() #recursive call

I don't get this error, are you using the latest version of interfaced?
EDIT: also, which version of Nim are you using?

I was using Nim 0.17.2 with latest version of the lib.

Nevermind, it works after switching to devel.
Weird that it doesn't work specifically on stable, considering that this library was updated 3 months ago.

I developed the library on devel, that explains it