Commit Graph

225 Commits

Author SHA1 Message Date
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
f7f3a25be8 first steps of making 'opt' a first class type for Nim 2017-09-25 13:19:36 +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
07d50cedf0 Fix #5983 2017-06-20 11:29:42 +02:00
Zahary Karadjov
a6006e56a7 Fix #4737 2017-06-20 11:29:42 +02:00
Araq
4033929127 fixes tproctypecache_falsepositive.nim test case 2017-06-08 18:35:37 +02:00
Zahary Karadjov
03172bef6f fix #5643; fix #5644 2017-04-08 23:42:42 +03: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
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
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
eab1d0cc02 support for accessing the inferred concept type params with the dot operator 2017-03-24 16:58:15 +02: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
2589d69ed2 fixes #5430 2017-02-26 00:32:07 +01:00
Andreas Rumpf
20ccf417f6 get rid of debug output 2017-02-15 12:26:28 +01:00
Andreas Rumpf
443a46b40d improve error message for mismatched proc types 2017-02-10 20:39:37 +01:00
Araq
0e1304a3e2 the compiler uses tyAlias internally; tester compiles again 2016-11-16 00:13:45 +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
3b43cff0f8 C codegen: first version of signature hashing for better incremental builds 2016-11-08 08:37:11 +01:00
Jacek Sieka
f5c3eb6a25 clean up tyMutable remnants 2016-10-24 23:30:10 +08:00
Jacek Sieka
b3de34548d clean up tyConst remnants 2016-10-24 23:19:46 +08:00
Jacek Sieka
f488ed973d clean up tyBigNum remnants 2016-10-24 23:11:38 +08:00
Jacek Sieka
6f7b891bdc remove remnants of tyIter 2016-10-24 21:10:48 +08:00
Andreas Rumpf
d60448fa69 fixes #4869 2016-10-21 03:09:00 +02:00
Andreas Rumpf
3a13706d7d fixes #4673 2016-09-01 13:02:53 +02:00
Andreas Rumpf
1d1253c87f fixes #4253 2016-08-26 14:04:56 +02:00
Andreas Rumpf
4d4a993e7f fixes #2865 2016-08-26 13:51:58 +02:00
Andreas Rumpf
10f445da89 Merge pull request #4592 from arnetheduck/compiler-cleanup
Compiler cleanup
2016-08-25 16:50:54 +02:00
Matthew Baulch
4e40d90f6f Add comments to clarify the roles of abstractX and typedescX types. 2016-08-21 14:13:42 +10:00
Jacek Sieka
4d558e2608 Merge remote-tracking branch 'origin/devel' into compiler-cleanup 2016-08-17 18:49:36 +08:00
Matthew Baulch
8ebce3ce2b Distinct types derived from ordinal types are ordinal. 2016-08-11 21:11:06 +10:00
Matthew Baulch
623e0763c2 Tidy up isOrdinalType 2016-08-11 21:09:34 +10:00
Jacek Sieka
3cd4cf4320 remove unused stuff 2016-08-09 22:54:27 +08:00
Andreas Rumpf
8f457f6ebb make tests green again 2016-07-29 23:51:01 +02:00
Andreas Rumpf
60b187513e stdlib and compiler don't use .immediate anymore 2016-07-29 23:51:01 +02:00
Andreas Rumpf
471672fecc fix: generic tuples instantiations were cached incorrectly 2016-07-28 20:23:24 +02:00
Andreas Rumpf
f47165af11 fixes #3706 2016-07-13 01:06:33 +02:00
Andreas Rumpf
928222cc67 fixes #4429 2016-07-12 10:31:36 +02:00
Andreas Rumpf
b47d9b7b91 fixes #4371 2016-07-08 10:34:12 +02:00
Matthew Baulch
109c9d551f Regard nil nodes as having equal type constraints. 2016-07-05 22:56:22 +10:00
Andreas Rumpf
e04f319540 fixes #4084 2016-04-29 22:30:00 +02:00
Yuriy Glukhov
3922a0871d else: break 2016-04-09 01:33:16 +03:00
Yuriy Glukhov
b6f5c12158 Fixed tr pattern matching for varargs 2016-04-07 21:24:43 +03:00
Andreas Rumpf
38dee2095c added 'sig' feature; removed tfShared support in the compiler 2016-02-28 19:56:41 +01:00
Andreas Rumpf
b6c18e4bba breaking change: disallow .closure procs for const 2015-12-29 15:42:12 +01:00
Araq
d93507fd2e fixes #3338 2015-10-22 10:24:46 +02:00
Ryan Gonzalez
a8e547971f Fix #3367 2015-09-23 13:44:45 -05:00
Adam Strzelecki
167acf4530 typeToString: Fix shared/not nil on complex types
Previously `not nil` flag was not shown on `cstring or nil` or `PType not nil`,
where `type PType = ref Type`, eg. when showing compiler diagnostics.
2015-09-06 20:17:06 +02:00