Zahary Karadjov
a74ad869e9
requested code review changes
2017-03-29 16:15:30 +03:00
Zahary Karadjov
c605d57574
restore compilation and make all concepts tests green
2017-03-24 17:03:55 +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
644d645ea7
implement the special treatment of explicit type params in concepts
2017-03-24 16:58:15 +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
76c663f692
support for inferring static[T] concept params
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
815724db71
support the full range of type modifiers when declaring concept vars and testing proc signatures
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
andri lim
568c954062
fixes #5241 , fixes #5411 inherit from specialized generic typeRel problem ( #5573 )
2017-03-23 23:39:29 +01:00
zah
a20a8e6adb
fixes #4756 ( #5557 )
2017-03-17 17:11:37 +01:00
zah
650b20dc5e
fix varargs forwarding for templates; fixes #5455 ( #5505 )
...
* fix varargs forwarding for templates; fixes #5455
* document the macros' varargs change in the news for 0.16.2
2017-03-13 22:02:11 +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
Andreas Rumpf
46efaf294b
big compiler refactoring; avoid globals for multi method dispatcher generation
2017-02-22 16:27:52 +01:00
Andreas Rumpf
ba29ca0c63
Merge branch 'devel' into faster-nimsuggest
2017-02-17 10:48:01 +01:00
Araq
0440aea691
fixes #5405
2017-02-16 21:30:54 +01:00
Andreas Rumpf
443a46b40d
improve error message for mismatched proc types
2017-02-10 20:39:37 +01:00
Zahary Karadjov
28005cf02d
alternative fix for #4884 ; fixes tlateboundstatic
2017-01-11 00:44:52 +02:00
Zahary Karadjov
bf612a7f19
fix #4884
2017-01-08 23:24:27 +02:00
Andreas Rumpf
e1828733f1
fixes #4519
2016-12-25 15:26:32 +01:00
Araq
237252f90c
Merge branch 'devel' into sighashes
2016-12-19 11:35:45 +01:00
Araq
bda8a6c1b7
fixes nimsuggest issue #41
2016-12-18 00:03:47 +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
Jacek Sieka
6f7b891bdc
remove remnants of tyIter
2016-10-24 21:10:48 +08:00
Andreas Rumpf
d0ec83eaa8
fixes #4863
2016-10-19 19:28:27 +02:00
Araq
7906527297
failed attempt to fix a 'void' inference bug
2016-10-08 10:47:47 +02:00
Andreas Rumpf
b78029b5af
fixes #4626
2016-09-13 16:33:43 +02:00
Andreas Rumpf
3a13706d7d
fixes #4673
2016-09-01 13:02:53 +02:00
Andreas Rumpf
f6a2ff731b
fixes #4672
2016-09-01 13:02:53 +02:00
Andreas Rumpf
be4748eb57
do not crash on #3928
2016-08-26 14:57:59 +02:00
Andreas Rumpf
98859a7248
fixes #4292
2016-08-26 14:36:46 +02:00
Andreas Rumpf
636e74fe39
overloading resolution: scoping is considered after typing (needs to be documented)
2016-08-24 11:27:14 +02:00
Andreas Rumpf
57b8664a0c
fixes #4589
2016-08-10 11:14:02 +02:00
Andreas Rumpf
09f122f68c
fixes #4528
2016-08-08 18:03:52 +02:00
Hans Raaf
e2e4df1702
Allowing nil for distinct types where the base type is nilable
2016-08-05 16:01:16 +02:00
Andreas Rumpf
7ac0b20339
fixes #4545
2016-08-04 01:37:41 +02:00
Andreas Rumpf
4d5c0027e6
fixes #4537
2016-08-02 14:53:21 +02:00
Andreas Rumpf
39ebe2175b
compiler almost free of deprecated expr/stmt names
2016-07-30 16:34:42 +02:00
Andreas Rumpf
60b187513e
stdlib and compiler don't use .immediate anymore
2016-07-29 23:51:01 +02:00
Andreas Rumpf
f5fa5dae85
generic multi-methods should work now
2016-07-28 20:23:24 +02:00
Andreas Rumpf
be22071b2e
fixes a varargs of untyped regression
2016-07-24 21:37:59 +02:00
Andreas Rumpf
d4573f1762
fixes #888
2016-07-19 20:19:52 +02:00
Andreas Rumpf
dc4b2c920c
fixes #4328
2016-07-19 19:27:38 +02:00
Andreas Rumpf
267855f9fb
make tests green again
2016-07-18 14:57:22 +02:00