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
Zahary Karadjov
0b0a3e5f20
support derived values in non-generic user type classes
2017-03-24 16:58:15 +02:00
Zahary Karadjov
a90c4c4d7e
kill the reportConceptFailures options as it will be replaced by the .explain. pragma
2017-03-24 16:58:15 +02:00
Zahary Karadjov
8cd5f1f8f5
introduce tyInferred for the unbound concept type params
...
* 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.
2017-03-24 16:58:15 +02:00
Zahary Karadjov
0a9a878bd3
support for matching generic types' procs in generic concepts
2017-03-24 16:58:15 +02:00
Zahary Karadjov
33f4e69759
support for accessing types and consts defined in concepts with the dot operator
2017-03-24 16:58:15 +02:00
Zahary Karadjov
eab1d0cc02
support for accessing the inferred concept type params with the dot operator
2017-03-24 16:58:15 +02:00
Zahary Karadjov
66e0f0e19c
concept type params inference working in basic examples
2017-03-24 16:58:15 +02:00
zah
be174fc3c7
Fix generic forward declarations; fixes #4104 ; fixes #4908 ( #5566 )
2017-03-23 12:40:57 +01:00
Araq
e01d2244e4
make semObjConstr robust for nimsuggest
2017-03-21 13:02:38 +01:00
Andreas Rumpf
2d0ee2c8ab
mark symbols in getAst context as used
2017-03-20 11:44:58 +01:00
Andreas Rumpf
a6b0af539b
revert getAst handling to not use overloading resolution
2017-03-20 10:56:15 +01:00
Araq
aa4260ffa8
overloading resolution for getAst; breaking change
2017-03-18 20:57:45 +01:00
Andreas Rumpf
4912300ca7
Merge branch 'devel' into faster-nimsuggest
2017-03-14 10:18:20 +01:00
zah
1be0022e7c
Fixes #5167 and related problems ( #5475 )
...
This commit returns to a bit less strict checking of the number
of macro arguments, because some old immediate macros rely on a
behavior where even the arity of the macro is not being checked.
It may be better if such macros are just declared to use varargs[expr],
but this remains for another day.
2017-03-12 09:33:49 +01:00
zah
6e358e3187
don't allow casting to non-concrete types; fixes #5428 ( #5502 )
2017-03-12 09:27:05 +01:00
Araq
57ea01309e
nimsuggest: more things work
2017-03-09 17:09:39 +01:00
Araq
3fa428c88b
fixes #5467
2017-03-07 00:27:47 +01:00
Araq
2589d69ed2
fixes #5430
2017-02-26 00:32:07 +01:00
Andreas Rumpf
46f33515d7
Merge branch 'devel' into faster-nimsuggest
2017-02-24 01:28:50 +01:00
Andreas Rumpf
2d546ca0ac
fixes #5417
2017-02-24 00:32:14 +01:00
Andreas Rumpf
46efaf294b
big compiler refactoring; avoid globals for multi method dispatcher generation
2017-02-22 16:27:52 +01:00
Araq
97e26967f1
fixes #5383
2017-02-16 00:43:14 +01:00
Araq
36d3fd64da
fixes #5354
2017-02-11 00:42:12 +01:00
Andreas Rumpf
d7e312ee13
nimsuggest works in macros
2017-02-07 10:43:33 +01:00
Araq
700c024e13
fixes #5148
2016-12-29 19:32:43 +01:00
Chris Heller
80f9dcc6eb
Used typed/untyped instead of stmt/expr in semQuoteAst. Fixes issue 5120 ( #5126 )
...
* Use typed/untyped instead of stmt/expr in semQuoteAst. Fixes #5120
2016-12-22 10:45:13 +01:00
Araq
24239c2361
Merge branch 'devel' into sighashes
2016-12-17 23:04:34 +01:00
jlp765
4acc84f081
Gramma change: casted or Casted to cast or Cast respectively
...
past tense of cast is cast not casted :-)
2016-12-17 12:33:57 +10:00
Araq
feb0d21b22
more fixes
2016-12-03 02:10:55 +01:00
Araq
2eee15d7f3
Merge branch 'devel' into sighashes
2016-12-01 10:06:41 +01:00
Araq
7b44896e03
fixes #5079
2016-11-30 21:10:22 +01:00
Araq
27723af469
Merge branch 'devel' into sighashes
2016-11-28 20:59:30 +01:00
Andreas Rumpf
01ae0d28d4
recursive modules are only detected to improve error messages
2016-11-24 12:27:21 +01:00
Araq
e6c5622aa7
removed tyArrayConstr completely from the compiler; introduced tyAlias instead in preparation for further bugfixes
2016-11-14 23:18:30 +01:00
Araq
29db0d8585
refactoring complete: explicit ident cache
2016-10-31 19:47:20 +01:00
Araq
773d17cd14
big refactoring: step 1
2016-10-31 15:34:44 +01:00
Andreas Rumpf
7c0fa52bbd
fixes #4875
2016-10-20 21:40:04 +02:00
Araq
3a5dfd6a03
fixes #4845
2016-10-08 10:47:47 +02:00
Andreas Rumpf
b78029b5af
fixes #4626
2016-09-13 16:33:43 +02:00
Andreas Rumpf
901e3dbb77
fixes #4699
2016-09-05 16:58:33 +02:00
Andreas Rumpf
3a13706d7d
fixes #4673
2016-09-01 13:02:53 +02:00
Andreas Rumpf
b4d7ab3caa
fixes #4179 ; disallow assignments to openarrays
2016-08-26 17:29:56 +02:00
Andreas Rumpf
10f445da89
Merge pull request #4592 from arnetheduck/compiler-cleanup
...
Compiler cleanup
2016-08-25 16:50:54 +02:00
Andreas Rumpf
f1e4d8ed74
side-effect computation now done in the proper pass; fixes #4254
2016-08-25 16:33:51 +02:00
Jacek Sieka
3cd4cf4320
remove unused stuff
2016-08-09 22:54:27 +08:00
Andreas Rumpf
5d56361383
fixes #4353
2016-08-04 19:36:13 +02:00