summary refs log tree commit diff stats
path: root/tests/pragmas
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pragmas')
-rw-r--r--tests/pragmas/tlocks.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/pragmas/tlocks.nim b/tests/pragmas/tlocks.nim
new file mode 100644
index 000000000..ba66a2dca
--- /dev/null
+++ b/tests/pragmas/tlocks.nim
@@ -0,0 +1,13 @@
+
+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
cs; new threads implementation still broken' href='/ahoang/Nim/commit/contributors.txt?h=devel&id=fd62116f6eb80d1dd3d6cc745d80629ad32dca1a'>fd62116f6 ^
f41bd71e6 ^
0e7f2ca3f ^
5eea125ba ^
f41bd71e6 ^


1
2
3
4
5
6
7
8
9
10
11
12
13