-
-
Save barcharcraz/87799af057a39a934528 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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