tlocks.nim 329 B

1234567891011121314
  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