Skip to content

Instantly share code, notes, and snippets.

@gmpreussner
Last active February 29, 2016 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmpreussner/14d27864e23ed6b02f0c to your computer and use it in GitHub Desktop.
Save gmpreussner/14d27864e23ed6b02f0c to your computer and use it in GitHub Desktop.
type
Foo[T] = concept x
var t = T()
x.foo(t)
x.bar(t) is T
FooImpl[T] = object
proc foo[T](f: FooImpl[T], t: T) = discard
proc bar[T](f: FooImpl[T], t: T): T = t
var f: FooImpl[int]
echo f is Foo[int] # returns false, should be true!?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment