summary refs log blame commit diff stats
path: root/tests/pragmas/tlocks.nim
blob: 5d6fcdd9c3bb8978003372865b03c2a2eee26553 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                   
type SomeBase* = ref object of RootObj
type SomeDerived* = ref object of SomeBase
  memberProc*: proc ()

method testMethod(g: SomeBase) {.base, locks: "unknown".} = discard
method testMethod(g: SomeDerived) =
  if g.memberProc != nil:
    g.memberProc()

# ensure int literals still work
proc plain*() {.locks: 0.} =
  discard