Skip to content

Instantly share code, notes, and snippets.

@nikki93
Created November 3, 2020 19:47
Show Gist options
  • Save nikki93/1081cb653455b7bb2145db4af04b46f3 to your computer and use it in GitHub Desktop.
Save nikki93/1081cb653455b7bb2145db4af04b46f3 to your computer and use it in GitHub Desktop.
able to see an unexported field from 'other' in 'main'; in code passed to a template
import other
echo thing.exported
#echo thing.notexported
other.doStuff:
echo thing.exported
echo thing.notexported
type
Thing = object
exported*: string
notexported: string
var thing*: Thing
thing.exported = "exported!!"
thing.exported = "not exported!!"
template doStuff*(body: untyped) =
body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment