summary refs log tree commit diff stats
path: root/tests/arc/t17812.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/arc/t17812.nim')
-rw-r--r--tests/arc/t17812.nim41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/arc/t17812.nim b/tests/arc/t17812.nim
new file mode 100644
index 000000000..dd8ac89b0
--- /dev/null
+++ b/tests/arc/t17812.nim
@@ -0,0 +1,41 @@
+discard """
+  targets: "c js"
+  matrix: "--gc:refc; --gc:arc"
+"""
+
+import std/times
+
+block: # bug #17812
+  block:
+    type
+      Task = object
+        cb: proc ()
+
+    proc hello() = discard
+
+
+    let t = Task(cb: hello)
+
+    doAssert t.repr.len > 0
+
+
+  block:
+    type MyObj = object
+      field: DateTime
+
+
+    proc `$`(o: MyObj): string = o.repr
+
+    doAssert ($MyObj()).len > 0
+
+# bug #22175
+
+type Xxx = object
+  value: string
+
+proc complete(xxx: ref Xxx, v: sink string) =
+  xxx.value = move(v)
+
+let yyy = (ref Xxx)()
+
+yyy.complete("test")
specs/ranger/blame/ranger.py?h=v1.9.0b4&id=419e4aa53fc99c29dce66cd46b7f894efd2d57a8'>^
0b5c4cbe ^
0b5c4cbe ^






2b3db775 ^
2b3db775 ^



3d566884 ^

2b3db775 ^
3d566884 ^


9dc6fe07 ^
3d566884 ^

9dc6fe07 ^
3d566884 ^

9dc6fe07 ^
3d566884 ^



3d566884 ^
f027adc0 ^




3d566884 ^
f027adc0 ^



0b5c4cbe ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68