Maybe this is useful:
type
TypeAObj = object
s: string
TypeBObj = object
i: int
MyObj* = ref object
case kind*: ObjKind
of typeA: a: TypeAObj
of typeB: b: TypeBObj
proc myProc(a: TypeAObj) = ...
Run
- Function overloading based on object.kind drkameleon
- Re: Function overloading based on object.kind Araq
