summary refs log tree commit diff stats
path: root/lib/std/varints.nim
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2023-09-18 07:39:22 +0300
committerGitHub <noreply@github.com>2023-09-18 06:39:22 +0200
commit5f9038a5d76847ebb922dc34c3333879e8160426 (patch)
treebf71da1f61d73fe76ac93487dbe70aaf88ca749c /lib/std/varints.nim
parentfcf4c1ae172080b8ef00b173977c223836bdebf2 (diff)
downloadNim-5f9038a5d76847ebb922dc34c3333879e8160426.tar.gz
make expressions opt in to symchoices (#22716)
refs #22605

Sym choice nodes are now only allowed to pass through semchecking if
contexts ask for them to (with `efAllowSymChoice`). Otherwise they are
resolved or treated as ambiguous. The contexts that can receive
symchoices in this PR are:

* Call operands and addresses and emulations of such, which will subject
them to overload resolution which will resolve them or fail.
* Type conversion operands only for routine symchoices for type
disambiguation syntax (like `(proc (x: int): int)(foo)`), which will
resolve them or fail.
* Proc parameter default values both at the declaration and during
generic instantiation, which undergo type narrowing and so will resolve
them or fail.

This means unless these contexts mess up sym choice nodes should never
leave the semchecking stage. This serves as a blueprint for future
improvements to intermediate symbol resolution.

Some tangential changes are also in this PR:

1. The `AmbiguousEnum` hint is removed, it was always disabled by
default and since #22606 it only started getting emitted after the
symchoice was soundly resolved.
2. Proc setter syntax (`a.b = c` becoming `` `b=`(a, c) ``) used to
fully type check the RHS before passing the transformed call node to
proc overloading. Now it just passes the original node directly so proc
overloading can deal with its typechecking.
Diffstat (limited to 'lib/std/varints.nim')
0 files changed, 0 insertions, 0 deletions
/pre>
66b9574b ^

d2451e51 ^
66b9574b ^

d2451e51 ^
66b9574b ^



d2451e51 ^

66b9574b ^

d2451e51 ^


66b9574b ^

91dee7d0 ^
d2451e51 ^
66b9574b ^


d2451e51 ^

66b9574b ^


d2451e51 ^

66b9574b ^



d2451e51 ^

66b9574b ^



d2451e51 ^

66b9574b ^

d2451e51 ^


66b9574b ^
85796198 ^
66b9574b ^

fbdb7fc7 ^
c8d7a2a2 ^
66b9574b ^
167dd672 ^

fbdb7fc7 ^


66b9574b ^

dd9cb39c ^


fbdb7fc7 ^
66b9574b ^





6340e6a2 ^
dd9cb39c ^
66b9574b ^



fbdb7fc7 ^





4eaa8830 ^
ea9df035 ^
4eaa8830 ^







66b9574b ^

fbdb7fc7 ^

66b9574b ^


fbdb7fc7 ^





4eaa8830 ^
ea9df035 ^
48c236c0 ^

4eaa8830 ^
48c236c0 ^




66b9574b ^

fbdb7fc7 ^
c69a8ab7 ^
66b9574b ^
6340e6a2 ^
24fc8e94 ^




66b9574b ^
6340e6a2 ^
8bc1392c ^
66b9574b ^
fbdb7fc7 ^
66b9574b ^
fbdb7fc7 ^
66b9574b ^
a1c62fc9 ^
66b9574b ^
4a897f27 ^
66b9574b ^
d4d45f41 ^
72e171f6 ^
66b9574b ^

dd9cb39c ^


85796198 ^
66b9574b ^
168bd542 ^
66b9574b ^
fc730139 ^
66b9574b ^
fc730139 ^
66b9574b ^
fc730139 ^
66b9574b ^
dd9cb39c ^
66b9574b ^
2a94a270 ^
66b9574b ^
fc730139 ^
167dd672 ^
66b9574b ^

167dd672 ^




66b9574b ^

167dd672 ^






66b9574b ^
af3dbce8 ^
66b9574b ^
167dd672 ^





66b9574b ^
167dd672 ^


66b9574b ^
167dd672 ^









2b26bfdc ^

66b9574b ^
167dd672 ^















dd9cb39c ^


66b9574b ^

c8d7a2a2 ^
dd9cb39c ^


167dd672 ^
85796198 ^
c8d7a2a2 ^


3cc7f9d2 ^
51d83224 ^
252174ba ^


c8d7a2a2 ^
3cc7f9d2 ^
51d83224 ^
252174ba ^


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