Skip to content

Instantly share code, notes, and snippets.

@barcharcraz
Created March 10, 2014 03:29
Show Gist options
  • Save barcharcraz/87799af057a39a934528 to your computer and use it in GitHub Desktop.
Save barcharcraz/87799af057a39a934528 to your computer and use it in GitHub Desktop.
type TThing[T] = object
type thingDoer = object
proc doTheThing[T: thingDoer](): int =
result = 4
proc doThing[T](self: TThing[T]): auto =
result = doTheThing[T]()
when isMainModule:
var inst: TThing[thingDoer]
echo doThing(inst)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment