summary refs log tree commit diff stats
path: root/tests/tuples/tuple_with_seq.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tuples/tuple_with_seq.nim')
-rw-r--r--tests/tuples/tuple_with_seq.nim46
1 files changed, 0 insertions, 46 deletions
diff --git a/tests/tuples/tuple_with_seq.nim b/tests/tuples/tuple_with_seq.nim
deleted file mode 100644
index 00b07dd2c..000000000
--- a/tests/tuples/tuple_with_seq.nim
+++ /dev/null
@@ -1,46 +0,0 @@
-discard """
-  output: '''it's nil
-@[1, 2, 3]'''
-"""
-
-template foo(s: string = "") =
-  if s.len == 0:
-    echo "it's nil"
-  else:
-    echo s
-
-foo
-
-
-# bug #2632
-
-proc takeTup(x: tuple[s: string;x: seq[int]]) =
-  discard
-
-takeTup(("foo", @[]))
-
-
-#proc foobar(): () =
-
-proc f(xs: seq[int]) =
-  discard
-
-proc g(t: tuple[n:int, xs:seq[int]]) =
-  discard
-
-when isMainModule:
-  f(@[]) # OK
-  g((1,@[1])) # OK
-  g((0,@[])) # NG
-
-
-# bug #2630
-type T = tuple[a: seq[int], b: int]
-
-var t: T = (@[1,2,3], 7)
-
-proc test(s: seq[int]): T =
-  echo s
-  (s, 7)
-
-t = test(t.a)
405b86068e6a3d39970b9129ceec0a9108464b28'>405b86068
f9d8d6ce0 ^
03724c295 ^




03724c295 ^




2df9b442c ^
03724c295 ^




4d4b3b1c0 ^
405b86068





8b2a9401a ^
405b86068












ff5b446df ^

405b86068
ff5b446df ^
405b86068

8098e2a42 ^

ff5b446df ^
405b86068

ff5b446df ^
405b86068
8098e2a42 ^
405b86068
ff5b446df ^
405b86068
286f16630 ^
405b86068
8b2a9401a ^
405b86068




e75e42191 ^



ff5b446df ^
e84834db7 ^
e75e42191 ^


ff5b446df ^
e84834db7 ^
405b86068
2df9b442c ^

405b86068

405b86068
ff5b446df ^
2df9b442c ^
405b86068
ff5b446df ^

405b86068
ff5b446df ^
2df9b442c ^

405b86068
439aa2d04 ^
405b86068
67a30d837 ^
f9d8d6ce0 ^
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113