Andreas Rumpf
f697596faf
semcheck: code cleanups
2018-04-28 07:49:36 +02:00
Andreas Rumpf
ee366f1746
.experimental can now be used to enable specific features
2018-04-24 09:34:29 +02:00
Andreas Rumpf
33b69f0ed0
refactoring: make FileIndex a distinct type; make line information an uint16; fixes #7654
2018-04-21 08:13:37 +02:00
Andreas Rumpf
e4081a7201
preparations for language extensions: 'sink' and 'lent' types
2018-01-07 23:09:26 +01:00
Araq
8d1a5dc8e7
the documentation generator now supports system.runnableExamples
2017-11-26 02:51:11 +01:00
Fabian Keller
7c03c882f5
Remove more usages of unary lt ( fixes #6634 ) ( #6641 )
...
* fixes #6634
* remove more usages of unary <
2017-10-31 19:48:01 +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
Araq
3aa7c2232e
destructors: supportsCopyMem finally works for recursive types
2017-10-26 00:55:23 +02:00
Araq
45d74f4081
destructors: preparations for upcoming changes
2017-10-17 12:46:49 +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
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
Zahary Karadjov
bc01835091
Allow tyOr,tyAnd and tyNot to be constructed in more contexts
2017-04-28 17:07:54 +03:00
Zahary Karadjov
34c34cb49b
move the object construction logic to a separate file
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
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
Zahary Karadjov
76c663f692
support for inferring static[T] concept params
2017-03-24 16:58:15 +02:00
Zahary Karadjov
815724db71
support the full range of type modifiers when declaring concept vars and testing proc signatures
2017-03-24 16:58:15 +02:00
Araq
ee13c8014b
nimsuggest: track type contexts
2017-03-01 09:57:51 +01:00
Araq
3d46600a90
nimsuggest supports prefix matching (first version)
2017-02-28 09:03:40 +01:00
Andreas Rumpf
46f33515d7
Merge branch 'devel' into faster-nimsuggest
2017-02-24 01:28:50 +01:00
Arne Döring
92c2a51bf7
removed compiler internal list implementation ( #5371 )
2017-02-22 17:33:12 +01:00
Andreas Rumpf
46efaf294b
big compiler refactoring; avoid globals for multi method dispatcher generation
2017-02-22 16:27:52 +01:00
Araq
0440aea691
fixes #5405
2017-02-16 21:30:54 +01:00
Araq
97e26967f1
fixes #5383
2017-02-16 00:43:14 +01:00
Araq
9c47bb9cc0
happy new year
2017-01-07 22:35:09 +01:00
Andreas Rumpf
9c4a60193f
new shift ops for Nim; based on #4743
2016-12-29 12:07:27 +01:00
Andreas Rumpf
01ae0d28d4
recursive modules are only detected to improve error messages
2016-11-24 12:27:21 +01:00
Araq
9e6fb3f696
new dependency tracking for nimsuggest
2016-11-05 01:19:23 +01:00
Araq
773d17cd14
big refactoring: step 1
2016-10-31 15:34:44 +01:00
Andreas Rumpf
f5fa5dae85
generic multi-methods should work now
2016-07-28 20:23:24 +02:00
Andreas Rumpf
e9eab32e54
new language feature: explicit 'import system' statements are allowed
2016-07-07 01:02:12 +02:00
Andreas Rumpf
e52044660d
Merge branch 'patch/fix-3496-generic-tmpl-args' of https://github.com/nanoant/Nim into nanoant-patch/fix-3496-generic-tmpl-args
2016-05-29 23:58:25 +02:00
Andreas Rumpf
6d76df8454
fixes #4227
2016-05-27 19:18:08 +02:00
Andreas Rumpf
38dee2095c
added 'sig' feature; removed tfShared support in the compiler
2016-02-28 19:56:41 +01:00
Andreas Rumpf
1afdefcbe9
added experimental .this pragma
2016-02-28 03:17:20 +01:00
Andreas Rumpf
c1627354d1
first implementation of the new lambda-lifting pass; barely anything works
2015-12-26 00:42:30 +01:00
Adam Strzelecki
47e45dee7e
fixes #3496
...
The problem comes from the fact that macroOrTmpl[...] is transformed by
semSubscript which is trying to evaluate macroOrTmpl identifier in place. This
is okay for non-generic macros or templates, but wrong for generic ones, that
do not have a chance to receive their generic arguments explicitly specified in
brackets.
Solution:
1. macroOrTmpl[...] where macroOrTmpl is non-generic macro or template, then
macroOrTmpl is evaluated before applying brackets. (as before)
2. macroOrTmpl[...] where macroOrTmpl is generic macro or template, then if:
a. It comes from macroOrTmpl[...](...) call expr (efInCall), then macroOrTmpl
is turned into a symbol (efNoEvaluate) rather than evaluating it in place,
then whole bracket expr is returned to semIndirectOp which transforms it
to proper generic macro or template call with explicit generic arguments.
b. macroOrTmpl[...] does not come from call expr, as above macroOrTmpl is
transformed to symbol, then it is transformed into proper generic macro or
template call with explicit generic arguments and no normal arguments.
2015-10-29 23:10:45 +01:00
Araq
c921f30b1d
renamed inCompilesContext to compilesContextId; added test case for #3313
2015-09-18 11:29:43 +02:00
Araq
5b2f54ffa1
fixes #3313
2015-09-18 11:24:16 +02:00
Araq
e01e0a4b40
next steps in binding [] properly
2015-09-13 22:42:21 +02:00
Araq
bcd8053b23
fixes #2585
2015-04-22 20:25:11 +02:00
Araq
e55f5d1fd4
fixes #2505 , fixes #1853 , fixes #2522
2015-04-20 21:25:49 +02:00
Araq
49471440eb
fixes #2481
2015-04-10 14:03:49 +02:00
Araq
78f371c03a
first implementation of overloading of '='; missing: rewriting let/var sections
2015-04-06 23:21:51 +02:00
Araq
5d63ecb3a4
implemented a[^1] notation
2015-03-26 02:12:38 +01:00
Araq
247af96b00
cleaned up some tests
2015-02-10 20:19:45 +01:00
Araq
fe30ec83e2
nimsuggest improvements
2015-01-30 03:04:45 +01:00