Araq
3bd6b7ddc7
improve the error messages for bug #6692
2017-11-05 02:51:20 +01:00
Andreas Rumpf
a155130cf2
fixes #1860 ; macro generating a wrong nkSymChoice node
2017-10-30 15:37:34 +01:00
Andreas Rumpf
d7a896f19d
breaking change: 'and' and 'mod' do not produce a subrange type anymore; fixes #5854
2017-10-30 00:27:30 +01:00
Andreas Rumpf
f1dab39086
remove old implementation of the roof operator; make tests green again; close #6292
2017-10-29 20:36:07 +01:00
Andreas Rumpf
d52a1061b3
work in progress: new implementation for 'a[^1]'
2017-10-29 19:46:17 +01:00
Andreas Rumpf
70ea45cdba
deprecated unary '<'
2017-10-29 08:37:13 +01:00
Araq
4f2b79a380
topttree destructor finally works
2017-10-26 00:55:23 +02:00
Araq
b407f083ba
destructors: work in progress
2017-10-26 00:55:23 +02:00
Andreas Rumpf
58d5f96790
destructors: lift type bound ops to objects and arrays etc
2017-10-17 14:48:16 +02:00
Araq
45d74f4081
destructors: preparations for upcoming changes
2017-10-17 12:46:49 +02:00
Araq
a75f3b3661
fixes #4910
2017-10-14 22:35:20 +02:00
Andreas Rumpf
63530be0b8
introduce --newruntime switch for the upcoming destructors and move semantics
2017-10-13 06:38:59 +02:00
Andreas Rumpf
a2e4ab2e4e
simple programs now work with the new destroyer pass
2017-10-12 17:42:15 +02:00
Andreas Rumpf
d8746398c4
allow macros to produce nnkGotoState and nkState
2017-10-09 21:12:40 +02:00
Andreas Rumpf
61720e0df9
breaking change: getAst strips away pointless nnkStmtList nodes; node rendering of nnkStmtList without wrong indentation
2017-09-26 10:24:14 +02:00
Andreas Rumpf
e879da5791
some work to make 'opt' a first class type
2017-09-24 11:21:52 +02:00
Andreas Rumpf
be2e7290fb
write tracking for funcs implemented
2017-09-23 23:29:23 +02:00
Andreas Rumpf
1a61c4d46d
first implementation of the 'func' keyword
2017-09-23 23:22:53 +02:00
Andreas Rumpf
fd4ef6ae8f
.pure enums are much more convenient to use now
2017-09-17 17:36:37 +02:00
Andreas Rumpf
a08fb61da9
make tests green again
2017-08-31 13:59:25 +02:00
Andreas Rumpf
8d714d2b02
low/high/of are now overloadable operations
2017-08-30 23:14:33 +02:00
Parashurama
03b11b66cf
fixes mitems iterator on vm. (issue with tuple value)
...
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.
2017-08-19 08:58:57 +02:00
Zahary Karadjov
c3e5c6c326
treat var modifiers inside the concept body correctly: #1033
2017-08-19 08:57:43 +02:00
Andreas Rumpf
4e3bdcc84b
fixes #6127
2017-07-22 17:07:59 +02:00
Andreas Rumpf
ee43fc82d5
bugfix: keep the information of a raw float literal in the AST
2017-07-06 13:52:21 +02:00
Andreas Rumpf
82175b43bb
do not crash for #5895
2017-07-06 13:52:21 +02:00
Zahary Karadjov
07d50cedf0
Fix #5983
2017-06-20 11:29:42 +02:00
Zahary Karadjov
21ce7b2af4
Fix #5888
2017-06-20 11:29:42 +02:00
Zahary Karadjov
cd02561368
introduce a pre-processing pass for the concept bodies
...
fixes #4982
fixes #3805
close #3414
2017-06-20 11:29:42 +02:00
Parashurama
bbf9ef606d
restrict casting for closure. ( #5948 ); fixes #5742
...
* 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
2017-06-07 08:52:50 +02:00
Andreas Rumpf
c59bc0cc18
first steps to allow easy functors via macros
2017-06-04 11:17:41 +02:00
Andreas Rumpf
61a0eba14f
Merge branch 'zahary' into araq2
2017-05-17 15:27:04 +02:00
Andreas Rumpf
503f780676
Merge branch 'zahary' into araq2
2017-05-16 17:32:18 +02:00
Zahary Karadjov
672c24e4b8
fix affecting templates with explicit generic params
2017-05-13 20:48:44 +03:00
cooldome
c6a8bd264e
Fix for #5695 make subscript operator overloadable for tuples ( #5749 )
2017-04-24 20:17:06 +02:00
Zahary Karadjov
54a1d9c16a
wip
2017-04-11 00:48:52 +03:00
Zahary Karadjov
8cb11aac4f
adapt quote to the new parsing rules
2017-04-10 12:23:04 +03:00
Zahary Karadjov
987b522071
fix the do notation when used with procs
2017-04-09 22:59:24 +03:00
Zahary Karadjov
e9a3ffbc3d
Restore the Nim's 0.14 proper handling of generic aliases
...
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
2017-04-08 17:28:19 +03:00
Zahary Karadjov
fb3ff64450
fix #5642
2017-04-07 19:28:52 +03:00
Zahary Karadjov
34c34cb49b
move the object construction logic to a separate file
2017-04-06 00:46:18 +03:00
Zahary Karadjov
f162214d5d
object construction: test cases and manual additions
2017-04-06 00:46:18 +03:00
Zahary Karadjov
564c0acae2
cleaned up the code and implemented proper error messages
2017-04-06 00:46:18 +03:00
Zahary Karadjov
6edb07091d
fix #4556
...
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.
2017-04-06 00:45:12 +03:00
Andreas Rumpf
529609f7ed
Merge remote-tracking branch 'origin/concepts-rebased' into araq
2017-03-31 16:40:21 +02:00
Andreas Rumpf
d02486aa48
compiler: better error messages ( #5613 )
2017-03-26 20:24:06 +02:00
Zahary Karadjov
cbf66e99a8
Working test cases for the sophisticated matrix library example from the manual
...
Fixed the dot operator when used within return types (see tgenericdotrettype)
Fixed the matching of generic concepts aliases used with the implicit generics style
2017-03-24 16:59:47 +02:00
Zahary Karadjov
fe48dd1cbe
further improvements to the error messages produced by concepts
2017-03-24 16:59:47 +02:00
Zahary Karadjov
74a80988d9
proper error reporting for concepts and the introduction of the {.explain.} pragma
2017-03-24 16:59:47 +02:00
Zahary Karadjov
0f2c4be129
infer static parameters even when more complicated arithmetic is involved
2017-03-24 16:58:15 +02:00