Skip to content

Instantly share code, notes, and snippets.

@Araq
Created May 14, 2013 22:17
Show Gist options
  • Select an option

  • Save Araq/5580120 to your computer and use it in GitHub Desktop.

Select an option

Save Araq/5580120 to your computer and use it in GitHub Desktop.
contexts
# module A
var a: int
template tmp*(): expr =
# declaration context: the 'a' from module A
a
# module B
var a: int
# instantiation context: the 'a' from module B
tmp()
# mixin context: both a's at the same time;
# can be resolved due to overloading resolution for procs etc. For vars it would be an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment