Commit graph

410 commits

Author SHA1 Message Date
Andreas Rumpf
4adc31ee3d stuff that is green 2018-04-28 18:23:54 +02:00
andri lim
e4aa140d22 fixes #7600, generic object with generic ref object parent typerel bug (#7678)
* fixes #7600

* fix wrong logic
2018-04-27 08:53:20 +02:00
cooldome
a95316f78b Implement float range types 2018-04-26 23:47:51 +01:00
zah
121b9e26fb Static[T] fixes (#7333)
* fix the usage of unresolved static[T] parameters in proc signatures
* fix tsametype and tmacrogenerics
* Allow creating composite type classes with concepts and using them in type signatures
* Allow integers to be used in ident concatenations
* Support using imported C++ generic types in proc signatures
* fixes #7230
* closes #7379
* re-enable some metatype tests
2018-03-24 15:28:09 +01:00
Araq
3979e83a59 fixes #7331 2018-03-18 17:56:28 +01:00
Andreas Rumpf
55a5dcf8a4 improves the stability of 'nim check' 2018-03-13 08:15:24 +01:00
Andreas Rumpf
3dab0877da fixes #7247 2018-02-23 11:42:19 +01:00
cooldome
51d81c4e23 Fixes #6853 (#7188)
* Fixes #6853
* Add a test for a const empty array
2018-02-10 16:44:41 +01:00
Andreas Rumpf
326b7dc556 improve the error messages regarding type mismatches in overloading resolution 2018-02-04 07:04:50 +01:00
Andreas Rumpf
992fd38487 make tests green again 2018-02-03 07:57:47 +01:00
Andreas Rumpf
1b22a3b346 disabled non-documented overloading rule for templates and macros 2018-02-02 11:00:42 +01:00
Andreas Rumpf
bd1dfa4b38 better type inference for numerical types; prerequisitive for version 1 2018-02-02 09:29:05 +01:00
Andreas Rumpf
2015895357 sink type begins to compile 2018-01-08 01:47:54 +01:00
Andreas Rumpf
a9ac241691 fixes #6073 2017-11-18 22:13:46 +01:00
cooldome
8443e3f6be Fix compiler crash (#6773) (#6774) 2017-11-18 09:21:37 +01:00
Andreas Rumpf
9e4e1949e8 concepts: fixes the stack overflow that happens for #6691 2017-11-05 21:31:02 +01:00
Andreas Rumpf
286f895280 make range type checking more restrictive, see tn8vsint16 test case; minor breaking change 2017-11-01 15:33:28 +01:00
Andreas Rumpf
29c075299d made nimresolve part of the compiler 2017-10-29 15:40:50 +01:00
Andreas Rumpf
70ea45cdba deprecated unary '<' 2017-10-29 08:37:13 +01:00
Araq
9c00f6decd fixes #6526 2017-10-27 20:55:36 +02:00
Araq
3aa7c2232e destructors: supportsCopyMem finally works for recursive types 2017-10-26 00:55:23 +02:00
Andreas Rumpf
0a3efccb55 preparations for another bugfix 2017-10-19 13:29:11 +02:00
Andreas Rumpf
3308d26581 breaking change: arrays of char do not convert to cstring; ptr to array of char does 2017-10-10 00:17:20 +02:00
Andreas Rumpf
e879da5791 some work to make 'opt' a first class type 2017-09-24 11:21:52 +02:00
Andreas Rumpf
1a61c4d46d first implementation of the 'func' keyword 2017-09-23 23:22:53 +02:00
Zahary Karadjov
4483cefa0c fix #5918 2017-08-19 08:57:43 +02:00
Zahary Karadjov
90e82f8ecf Fix #5084 2017-06-20 11:29:42 +02:00
Zahary Karadjov
a6006e56a7 Fix #4737 2017-06-20 11:29:42 +02:00
Zahary Karadjov
16eb4b1fee Fix #5127 2017-06-20 11:29:42 +02:00
Zahary Karadjov
367d232351 fix #1017; fix #3309 2017-06-20 11:29:42 +02:00
Zahary Karadjov
ba61e7e3ac fix #2730; fix #4880 2017-06-20 11:29:42 +02:00
Zahary Karadjov
9c6fe59b55 fix #5017; fix #5893 2017-06-20 11:29:42 +02:00
Zahary Karadjov
f713e730c8 fix #5864 2017-06-20 11:29:42 +02:00
Zahary Karadjov
dea6d8dd94 add a useful helper for debugging typeRel problems 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
Zahary Karadjov
30ccadfe4c fix #5890 2017-06-20 11:29:42 +02:00
Andreas Rumpf
7a95c961a7 cleanup of in/out covariance handling 2017-05-17 20:54:53 +02:00
Zahary Karadjov
0aede22e87 enforce the covariance rules for user-defined generic types 2017-05-13 14:38:07 +03:00
Zahary Karadjov
f4e73344d4 covariance for arrays and sequences 2017-05-12 18:42:46 +03:00
Zahary Karadjov
a802d72452 doh, forgot to add all files in the previous commit 2017-05-12 12:46:09 +03:00
Zahary Karadjov
c981284ddc a simple way to simulate covariance in generic types 2017-04-28 17:40:57 +03:00
Zahary Karadjov
3e52bb6535 fix a regrsesion in signature matching of derived ptr types 2017-04-18 23:55:59 +03:00
Zahary Karadjov
13701c0957 Restore the compilation of linalg by tweaking the complex disambiguation rules
This commit is a potentially breaking change, but the problem was that
linalg was relying on a previous bug in the compiler, which was fixed
in the concepts branch.

With the old disambiguation rules, generic procs like:

proc \`==\`[T](lhs, rhs: T)

and

proc \`==\`(lhs, rhs: Matrix32|Matrix64)

.. were considered equal, even though it's obvious that the second one
should be preferred. We never noticed this, because there was a bug in
sigmatch incorrectly counting one of the params of the second proc as
a non-generic match, thus giving it an edge.

This commit gives some preference to tyOr and tyAnd during the complex
disambiguation, which may affect overload resolution in other cases.

I see this only as a temporary solution. With my upcoming work on
concept refinement, I plan to provide an experimental implementation
of alaternative C++-like rules for determining which proc is more specific.
We can then discuss our strategy for dealing with such a breaking change.
2017-04-16 16:11:45 +03:00
Zahary Karadjov
2da4a4fbe3 fix regression in tmatrixconcept 2017-04-16 14:39:00 +03:00
Zahary Karadjov
dfbafff2e7 fix a compilation error in linalg 2017-04-16 02:44:58 +03:00
Zahary Karadjov
bf4ce87e5b fix #5689 2017-04-15 02:53:28 +03:00
Zahary Karadjov
d578815963 fix #5683 2017-04-14 23:54:09 +03:00
Zahary Karadjov
a3f19c87fb lift parameter-less do block to lambdas 2017-04-10 23:58:05 +03:00
Zahary Karadjov
987b522071 fix the do notation when used with procs 2017-04-09 22:59:24 +03:00
Zahary Karadjov
03172bef6f fix #5643; fix #5644 2017-04-08 23:42:42 +03:00