summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2020-07-07 10:21:18 +0200
committerGitHub <noreply@github.com>2020-07-07 10:21:18 +0200
commit5bd2da3f6461ef4dbcfd1f0c35178fa8fa9b5368 (patch)
treedb6995ea3847b0f8533ef0b101f0c0e824450b4f /tests
parentebd97884a0134ba2f88e19f647585aa6133536aa (diff)
downloadNim-5bd2da3f6461ef4dbcfd1f0c35178fa8fa9b5368.tar.gz
Fix #14911 (#14922) [backport]
* Fix #14911

* Add testcase

* Fix test
Diffstat (limited to 'tests')
-rw-r--r--tests/tuples/ttuples_issues.nim9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/tuples/ttuples_issues.nim b/tests/tuples/ttuples_issues.nim
index 9380bd027..f294f2f1c 100644
--- a/tests/tuples/ttuples_issues.nim
+++ b/tests/tuples/ttuples_issues.nim
@@ -1,5 +1,7 @@
 discard """
-output: '''
+output: '''(a: 1)
+(a: 1)
+(a: 1, b: 2)
 '''
 """
 
@@ -75,3 +77,8 @@ block t1986:
     (var1: test(), var2: 100'u32),
     (var1: test(), var2: 192'u32)
   ]
+
+# bug #14911
+echo (a: 1)  # works
+echo (`a`: 1)  # works
+echo (`a`: 1, `b`: 2)  # Error: named expression expected
94e429f ^
a947a31 ^

















2fc20ef ^
a947a31 ^









452477a ^
a947a31 ^


















































26f3d58 ^
a947a31 ^
2cda042 ^
a947a31 ^
88ad431 ^


a947a31 ^

94e429f ^

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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163