Created
November 3, 2020 19:47
-
-
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
This file contains 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
import other | |
echo thing.exported | |
#echo thing.notexported | |
other.doStuff: | |
echo thing.exported | |
echo thing.notexported |
This file contains 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 | |
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