Nim/tests/template/mcan_access_hidden_field.nim
2014-01-13 02:10:03 +01:00

9 lines
139 B
Nim

type
Foo* = object
fooa, foob: int
proc createFoo*(a, b: int): Foo = Foo(fooa: a, foob: b)
template geta*(f: Foo): expr = f.fooa