summary refs log blame commit diff stats
path: root/tests/template/mcan_access_hidden_field.nim
blob: 2c0026ec1f13fc3d63d441354520d7ce75d4a0b7 (plain) (tree)
1
2
3
4
5
6
7
8






                                                       
                                        
type
  Foo* = object
    fooa, foob: int

proc createFoo*(a, b: int): Foo = Foo(fooa: a, foob: b)

template geta*(f: Foo): untyped = f.fooa