summary refs log tree commit diff stats
path: root/tests/stdlib/tcasts.nim
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2024-08-28 21:51:13 +0300
committerGitHub <noreply@github.com>2024-08-28 20:51:13 +0200
commit770f8d551372893ed480550062a89e76c60ff4a8 (patch)
tree87f6e049aea09dfcd9bbed2fccb67f84d3172445 /tests/stdlib/tcasts.nim
parentd3af51e3ce968076bb3331087806312c0faba054 (diff)
downloadNim-770f8d551372893ed480550062a89e76c60ff4a8.tar.gz
opensym for templates + move behavior of opensymchoice to itself (#24007)
fixes #15314, fixes #24002

The OpenSym behavior first added to generics in #23091 now also applies
to templates, since templates can also capture symbols that are meant to
be replaced by local symbols if the context imports symbols with the
same name, as in the issue #24002. The experimental switch
`templateOpenSym` is added to enable this behavior for templates only,
and the experimental switch `openSym` is added to enable it for both
templates and generics, and the documentation now mainly mentions this
switch.

Additionally the logic for `nkOpenSymChoice` nodes that were previously
wrapped in `nkOpenSym` now apply to all `nkOpenSymChoice` nodes, and so
these nodes aren't wrapped in `nkOpenSym` anymore. This means
`nkOpenSym` can only have children of kind `nkSym` again, so it is more
in line with the structure of symchoice nodes. As for why they aren't
merged with `nkOpenSymChoice` nodes yet, we need some way to signal that
the node shouldn't become ambiguous if other options exist at
instantiation time, we already captured a symbol at the beginning and
another symbol can only replace it if it's closer in scope and
unambiguous.
Diffstat (limited to 'tests/stdlib/tcasts.nim')
0 files changed, 0 insertions, 0 deletions
6a2c52719390d50ee661'>765692514 ^
591007878 ^
c735b75f6 ^

5b9776278 ^



765692514 ^
25649616e ^

25cb2e0c7 ^
afeca3d9f ^
1fa22d4cf ^
afeca3d9f ^
8a357c270 ^

afeca3d9f ^
044cef152 ^

25cb2e0c7 ^
591007878 ^
56f79ab0b ^
591007878 ^

16aa10dfe ^
afeca3d9f ^
3e0fac7c2 ^


f7d2f9c5f ^
f94ec363a ^




591007878 ^
aeb6ec27d ^
16aa10dfe ^

3e0fac7c2 ^
591007878 ^


56f79ab0b ^
591007878 ^

88b5dd336 ^
e3e17009f ^

6206ba8f3 ^
83c89197f ^
139497834 ^


afeca3d9f ^

87232a38e ^

0a749f1a3 ^
ae2923e5d ^
afeca3d9f ^

591007878 ^

1d7e3a84f ^
ae2923e5d ^



591007878 ^
ae2923e5d ^
afeca3d9f ^


ac8f6c57a ^
c0a47f7e2 ^
56f79ab0b ^

c0a47f7e2 ^






591007878 ^

c0a47f7e2 ^



56f79ab0b ^
c0a47f7e2 ^

591007878 ^
8fbe3b3b7 ^
afeca3d9f ^

7a670a6bc ^
afeca3d9f ^
15773c455 ^
f7d2f9c5f ^


0a2f711b9 ^


3e0fac7c2 ^



49e686ab4 ^


a68fe3d08 ^


737fff590 ^
e3e17009f ^

331d1a6ca ^












ff950725f ^
737fff590 ^
5ba22c931 ^


ff950725f ^
e3e17009f ^

84ca9d290 ^
765692514 ^
e2094bc6f ^
84ca9d290 ^


8960efa34 ^

77a8c6ffd ^
f9bc4d014 ^

963292f72 ^


6206ba8f3 ^
086676782 ^

a38f35359 ^
f7d2f9c5f ^
ac8274c60 ^
070bcf4ce ^

9cc4a5776 ^
f7d2f9c5f ^
3ba8f158f ^
f7d2f9c5f ^
7a670a6bc ^
f7d2f9c5f ^
c4e3c4ca2 ^
ce5e8b93e ^

695206a00 ^

591007878 ^
b2a5195e9 ^
7d7cd6907 ^
9cc4a5776 ^
142a2d355 ^
695206a00 ^
aeb6ec27d ^
56f79ab0b ^
3647c03ca ^
afeca3d9f ^
e3e17009f ^
212457f5e ^
f8cef575b ^


06122ff71 ^
ca4b971bc ^


cc5b8c6ad ^


591007878 ^
80843373b ^
8d850f7a6 ^



c0fc2f572 ^



ce9815bcf ^


591007878 ^
737fff590 ^
0e57b4cf6 ^
f7d2f9c5f ^
3e0fac7c2 ^

8180d443b ^
c0fc2f572 ^
e3e17009f ^

f7d2f9c5f ^
413580bc0 ^

591007878 ^

044cef152 ^
591007878 ^
044cef152 ^
988412905 ^
fc4f0808c ^

f7d2f9c5f ^
e3e17009f ^

b5448bf25 ^

7a670a6bc ^
b5448bf25 ^

737fff590 ^
044cef152 ^
05b8085a8 ^

044cef152 ^
05b8085a8 ^

737fff590 ^


b3a80dd2e ^
e3e17009f ^
737fff590 ^
591007878 ^

db95fad6f ^
821920aa3 ^
56f79ab0b ^
923086253 ^

e3e17009f ^
f7d2f9c5f ^
e3e17009f ^
737fff590 ^
591007878 ^
ca4b971bc ^





7a670a6bc ^
9ecb1aae8 ^
721534119 ^


f7d2f9c5f ^
737fff590 ^
e3037a2f3 ^
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294