Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell
Created April 7, 2017 04:56
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 dustinlacewell/357da4321c041ff69d0503d6994b23af to your computer and use it in GitHub Desktop.
Save dustinlacewell/357da4321c041ff69d0503d6994b23af to your computer and use it in GitHub Desktop.
template `isA` (a, b: untyped): untyped =
# this definition exists in the System module
compiles((b)a)
# test.nim(19, 16) Error: type mismatch: got (typedesc[Leaf[system.string]])
# but expected one of:
# template isA(a, b: untyped): untyped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment