summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
Commit message (Collapse)AuthorAgeFilesLines
* breaking change: 'and' and 'mod' do not produce a subrange type anymore; ↵Andreas Rumpf2017-10-301-1/+0
| | | | fixes #5854
* remove old implementation of the roof operator; make tests green again; ↵Andreas Rumpf2017-10-291-10/+1
| | | | close #6292
* work in progress: new implementation for 'a[^1]'Andreas Rumpf2017-10-291-1/+1
|
* deprecated unary '<'Andreas Rumpf2017-10-291-10/+10
|
* topttree destructor finally worksAraq2017-10-261-13/+0
|
* destructors: work in progressAraq2017-10-261-0/+13
|
* destructors: lift type bound ops to objects and arrays etcAndreas Rumpf2017-10-171-2/+2
|
* destructors: preparations for upcoming changesAraq2017-10-171-0/+3
|
* fixes #4910Araq2017-10-141-4/+7
|
* introduce --newruntime switch for the upcoming destructors and move semanticsAndreas Rumpf2017-10-131-1/+1
|
* simple programs now work with the new destroyer passAndreas Rumpf2017-10-121-3/+4
|
* allow macros to produce nnkGotoState and nkStateAndreas Rumpf2017-10-091-0/+4
|
* breaking change: getAst strips away pointless nnkStmtList nodes; node ↵Andreas Rumpf2017-09-261-3/+4
| | | | rendering of nnkStmtList without wrong indentation
* some work to make 'opt' a first class typeAndreas Rumpf2017-09-241-7/+3
|
* write tracking for funcs implementedAndreas Rumpf2017-09-231-1/+2
|
* first implementation of the 'func' keywordAndreas Rumpf2017-09-231-8/+8
|
* .pure enums are much more convenient to use nowAndreas Rumpf2017-09-171-2/+4
|
* make tests green againAndreas Rumpf2017-08-311-2/+4
|
* low/high/of are now overloadable operationsAndreas Rumpf2017-08-301-38/+3
|
* fixes mitems iterator on vm. (issue with tuple value)Parashurama2017-08-191-0/+3
| | | | | | this discard any implicit conversion on iterator return value. the previous behaviour was to return a reference to a converted copy and thus not modifying the original value.
* treat var modifiers inside the concept body correctly: #1033Zahary Karadjov2017-08-191-1/+6
|
* fixes #6127Andreas Rumpf2017-07-221-5/+3
|
* bugfix: keep the information of a raw float literal in the ASTAndreas Rumpf2017-07-061-3/+3
|
* do not crash for #5895Andreas Rumpf2017-07-061-1/+1
|
* Fix #5983Zahary Karadjov2017-06-201-1/+4
|
* Fix #5888Zahary Karadjov2017-06-201-1/+1
|
* introduce a pre-processing pass for the concept bodiesZahary Karadjov2017-06-201-2/+2
| | | | | | | fixes #4982 fixes #3805 close #3414
* restrict casting for closure. (#5948); fixes #5742Parashurama2017-06-071-1/+6
| | | | | | | | | * restrict casting for closure. This commit forbid casting a closure to anything other than another closure. use rawEnv/rawProc to access underlaying pointers. * better error message for closure cast * fixes #5742
* first steps to allow easy functors via macrosAndreas Rumpf2017-06-041-17/+3
|
* Merge branch 'zahary' into araq2Andreas Rumpf2017-05-171-26/+5
|\
| * fix affecting templates with explicit generic paramsZahary Karadjov2017-05-131-26/+5
| |
* | Merge branch 'zahary' into araq2Andreas Rumpf2017-05-161-15/+20
|\|
| * wipZahary Karadjov2017-04-111-4/+5
| |
| * adapt quote to the new parsing rulesZahary Karadjov2017-04-101-8/+11
| |
| * fix the do notation when used with procsZahary Karadjov2017-04-091-2/+1
| |
| * Restore the Nim's 0.14 proper handling of generic aliasesZahary Karadjov2017-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | A more efficient implementation is possible by restoring the old lifting ot tyGenericInvocation to tyGenericInst in liftTypeParam, but this fix will suffice for now. fixes #5087 fixes #5602 fixes #5641 fixes #5570
| * fix #5642Zahary Karadjov2017-04-071-0/+2
| |
* | Fix for #5695 make subscript operator overloadable for tuples (#5749)cooldome2017-04-241-3/+3
|/
* move the object construction logic to a separate fileZahary Karadjov2017-04-061-277/+1
|
* object construction: test cases and manual additionsZahary Karadjov2017-04-061-10/+8
|
* cleaned up the code and implemented proper error messagesZahary Karadjov2017-04-061-77/+178
|
* fix #4556Zahary Karadjov2017-04-061-55/+164
| | | | | | | | | | | | | | | | | | | | | This implements a number of new safety checks and error messages when object constructors are used: In case objects: * the compiler will prevent you from initializing fields in conflicting branches * When a field from a particular branch is initialized, the compiler will demand that the discriminator field is also supplied with a maching compile-time value In all objects: * When the "requiresInit" pragma is applied to a type, all fields of the type must be initialized when object construction is used. The code will be simplified in a follow up commit.
* Merge remote-tracking branch 'origin/concepts-rebased' into araqAndreas Rumpf2017-03-311-34/+82
|\
| * Working test cases for the sophisticated matrix library example from the manualZahary Karadjov2017-03-241-8/+20
| | | | | | | | | | Fixed the dot operator when used within return types (see tgenericdotrettype) Fixed the matching of generic concepts aliases used with the implicit generics style
| * further improvements to the error messages produced by conceptsZahary Karadjov2017-03-241-5/+6
| |
| * proper error reporting for concepts and the introduction of the {.explain.} ↵Zahary Karadjov2017-03-241-5/+17
| | | | | | | | pragma
| * infer static parameters even when more complicated arithmetic is involvedZahary Karadjov2017-03-241-0/+1
| |
| * support derived values in non-generic user type classesZahary Karadjov2017-03-241-19/+20
| |
| * kill the reportConceptFailures options as it will be replaced by the ↵Zahary Karadjov2017-03-241-4/+1
| | | | | | | | .explain. pragma
| * introduce tyInferred for the unbound concept type paramsZahary Karadjov2017-03-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Why is tyInferred needed? The bindings in TCandidate are capable of inferring types within a single call expression. In concepts, we need to infer types in the same way, but across the whole body of the concept. Previously, once a concept type param was inferred, it was destructively mutated using t.assignType, but this proved to be problematic in the presence of overloads, because the bindings established while a non-matching overload is tested must be reverted/forgotten. tyInferred offers a non-destructive way to keep track of the inference progress. While introducing new types usually requires a lot of code paths in the compiler to updated, currently tyInferred is only a short-lived type within the concept body pass and it's unlikely to introduce breakage elsewhere in the compiler.
aned up the tests; fixes #30; fixes #26' href='/ahoang/Nim/commit/compiler/docgen.nim?h=devel&id=6ff8752be53b7c0ad2c01615fdf1ab1bb619fb83'>6ff8752be ^
c323ec015 ^


6ff8752be ^
e25474154 ^






3c9851848 ^
e25474154 ^
6ff8752be ^



e25474154 ^



e25474154 ^
c323ec015 ^
902bf0587 ^




e25474154 ^








c323ec015 ^
e25474154 ^


a6daf7152 ^
e25474154 ^
c323ec015 ^
e25474154 ^

c323ec015 ^
e25474154 ^

c323ec015 ^
e2d38a57e ^
e25474154 ^
c323ec015 ^
e2d38a57e ^
e25474154 ^
c323ec015 ^
e25474154 ^

c323ec015 ^
e95f155af ^
e25474154 ^



e95f155af ^

e25474154 ^
c323ec015 ^
e25474154 ^





c323ec015 ^
76235348f ^
e25474154 ^
adf13aaea ^


fa111b906 ^
07b784373 ^



d171a8b36 ^
07b784373 ^
01ab5948a ^
e25474154 ^
fd522aa40 ^






7fcbdc6d4 ^

e25474154 ^
7fcbdc6d4 ^


e25474154 ^



adf13aaea ^

fa111b906 ^


fd522aa40 ^
e25474154 ^

07b784373 ^
7fcbdc6d4 ^
07b784373 ^

e25474154 ^
76235348f ^
e25474154 ^

76235348f ^
e25474154 ^

76235348f ^
e25474154 ^

2ff8d1736 ^

76235348f ^




e25474154 ^


76235348f ^
e25474154 ^

76235348f ^



e25474154 ^
07b784373 ^
76235348f ^
fa111b906 ^

76235348f ^
e25474154 ^
07b784373 ^
fa111b906 ^
76235348f ^


e25474154 ^



01ab5948a ^
76235348f ^


e25474154 ^
869a5aa90 ^
f8dd74a07 ^



869a5aa90 ^
f8dd74a07 ^
76235348f ^
fc9fdc2b9 ^
e25474154 ^
76235348f ^
e25474154 ^

fc9fdc2b9 ^
e25474154 ^

76235348f ^
0ea4b71ee ^
76235348f ^
c323ec015 ^
28b68d914 ^
76235348f ^


f8dd74a07 ^
e25474154 ^

76235348f ^
fc9fdc2b9 ^
e25474154 ^
76235348f ^
e25474154 ^
fc9fdc2b9 ^
c617479c6 ^
76235348f ^








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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367