Commit Graph

3743 Commits

Author SHA1 Message Date
Araq
4b76d9846b Merge branch 'devel' of github.com:nim-lang/Nim into devel 2017-04-19 15:20:54 +02:00
Araq
5018f6fa15 fixes #5729 2017-04-19 15:20:46 +02:00
Andreas Rumpf
b7bffa35c7 attempt to make sighashes produce smaller diffs 2017-04-19 08:40:05 +02: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
4da8536701 fix compilation regression in alea 2017-04-16 13:42:33 +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
8de19a7f4c fix a parsing regression (do is still mandatory in some situations) 2017-04-14 23:48:43 +03:00
Andreas Rumpf
55b5401dc6 fixes yet another regression caused by the .procvar removal 2017-04-14 19:18:26 +02:00
Jacek Sieka
e512358bc9 Linux abi take 3 (#5692)
* avoid generating object fields for imported types
* fix some abi/type issues for linux_amd64
2017-04-12 22:57:10 +02:00
Zahary Karadjov
54a1d9c16a wip 2017-04-11 00:48:52 +03:00
Zahary Karadjov
a3f19c87fb lift parameter-less do block to lambdas 2017-04-10 23:58:05 +03:00
Zahary Karadjov
f7b10e213b support post expression blocks in return and yield 2017-04-10 17:26:50 +03:00
Zahary Karadjov
8b63b84924 fix a regression in tlexerex 2017-04-10 13:06:06 +03:00
Zahary Karadjov
8cb11aac4f adapt quote to the new parsing rules 2017-04-10 12:23:04 +03:00
Zahary Karadjov
e7eb01ed48 fix a parsing regression (calls with do inside param lists)
This treatment is applied only when "do" is used, because
the code foo(x: bar) is recognized as object construction.
2017-04-10 12:08:40 +03:00
Zahary Karadjov
9ffaee3f88 fully consisent parsing between the new and the old 'do blocks' 2017-04-10 11:44:02 +03:00
Zahary Karadjov
34b2527441 the new blocks without 'do' produce compatible AST with 'do blocks' 2017-04-09 23:45:52 +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
Fredrik Høisæther Rasch
392f025148 Error Message if CC invocation fails (#5663) 2017-04-08 19:06:19 +02:00
Zahary Karadjov
e9a3ffbc3d Restore the Nim's 0.14 proper handling of generic aliases
A more efficient implementation is possible by restoring the old
lifting ot tyGenericInvocation to tyGenericInst in liftTypeParam,
but this fix will suffice for now.

fixes #5087
fixes #5602
fixes #5641
fixes #5570
2017-04-08 17:28:19 +03:00
Zahary Karadjov
0b7321651e fix #5658 2017-04-07 21:53:27 +03:00
Zahary Karadjov
e11b3520ff fix #5654 2017-04-07 19:35:05 +03:00
Zahary Karadjov
fb3ff64450 fix #5642 2017-04-07 19:28:52 +03:00
Zahary Karadjov
eb635d9ccf fix #5648 2017-04-07 17:03:49 +03:00
Zahary Karadjov
ee4b98ec17 wip fix #5640 2017-04-07 15:05:14 +03:00
Zahary Karadjov
34c34cb49b move the object construction logic to a separate file 2017-04-06 00:46:18 +03:00
Zahary Karadjov
f162214d5d object construction: test cases and manual additions 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
Andreas Rumpf
88c4d6aabe fix another compiler regression 2017-04-05 11:32:23 +02:00
Andreas Rumpf
ac81a99892 make tests green again 2017-04-04 18:05:53 +02:00
Andreas Rumpf
bfaa329680 Merge branch 'devel' into araq 2017-04-04 13:38:41 +02:00
Andreas Rumpf
0b79a2b02e attempt to make tests green again 2017-04-04 13:28:15 +02:00
Andreas Rumpf
e21ca54b11 assignments support ': stmtList' like let/var do 2017-04-04 12:20:43 +02:00
Araq
87732f797c fixes #5638 2017-04-04 12:08:34 +02:00
Araq
e105c04e49 revert PR #5638 because it breaks code 2017-04-04 10:43:54 +02:00
Andreas Rumpf
08f5087d2c remove the need for the .procvar annotation 2017-04-03 16:35:41 +02:00
Andreas Rumpf
e8cfa14354 de-deprecate silly warning about non-exhaustive string case statments 2017-04-03 12:28:06 +02:00
Andreas Rumpf
f520dfbfab remove en-dash from the language 2017-04-02 23:41:29 +02:00
Andreas Rumpf
d587b6a25f language addition: colon-block for expressions in let/var context 2017-04-02 23:38:55 +02:00
Anatoly Galiulin
5fdd03ad4d Fixed issue #5638 (#5639) 2017-04-01 14:14:34 +02:00
Emery Hemingway
7e351fc7fa support for the Genode OS framework (#5560) 2017-03-31 23:13:06 +02:00
Silvio
2946c7a4b9 Implementing repr for JS (#5578) 2017-03-31 22:00:48 +02:00
andri lim
2f9a698e87 attempt to fix #5632 typedesc typeRel regression (#5634) 2017-03-31 21:58:26 +02:00
andri lim
fce4b7cd62 attempt to fix #5621 #5615 generic ref object typeRel (#5633) 2017-03-31 21:58:09 +02:00