tlocks.nim 328 B

12345678910111213
  1. type SomeBase* = ref object of RootObj
  2. type SomeDerived* = ref object of SomeBase
  3. memberProc*: proc ()
  4. method testMethod(g: SomeBase) {.base, locks: "unknown".} = discard
  5. method testMethod(g: SomeDerived) =
  6. if g.memberProc != nil:
  7. g.memberProc()
  8. # ensure int literals still work
  9. proc plain*() {.locks: 0.} =
  10. discard