Commit graph Nim/compiler/semexprs.nim
Author SHA1 Message Date
Araq
d673fb3911 nimsuggest: added 'chk', 'outline' and 'highlight' features 2015-11-01 23:26:31 +01:00
Adam Strzelecki
47e45dee7e fixes #3496
The problem comes from the fact that macroOrTmpl[...] is transformed by
semSubscript which is trying to evaluate macroOrTmpl identifier in place. This
is okay for non-generic macros or templates, but wrong for generic ones, that
do not have a chance to receive their generic arguments explicitly specified in
brackets.

Solution:

1. macroOrTmpl[...] where macroOrTmpl is non-generic macro or template, then
   macroOrTmpl is evaluated before applying brackets. (as before)

2. macroOrTmpl[...] where macroOrTmpl is generic macro or template, then if:

   a. It comes from macroOrTmpl[...](...) call expr (efInCall), then macroOrTmpl
      is turned into a symbol (efNoEvaluate) rather than evaluating it in place,
      then whole bracket expr is returned to semIndirectOp which transforms it
      to proper generic macro or template call with explicit generic arguments.

   b. macroOrTmpl[...] does not come from call expr, as above macroOrTmpl is
      transformed to symbol, then it is transformed into proper generic macro or
      template call with explicit generic arguments and no normal arguments.
2015-10-29 23:10:45 +01:00
Araq
e722770fbb doc\advopt.txt
added --reportConceptFailures switch
2015-10-22 12:14:31 +02:00
Araq
3fef9f08bd fixes regression: tactiontable 2015-10-14 14:35:44 +02:00
Araq
c921f30b1d renamed inCompilesContext to compilesContextId; added test case for #3313 2015-09-18 11:29:43 +02:00
Araq
5b2f54ffa1 fixes #3313 2015-09-18 11:24:16 +02:00
Araq
1251fc76c3 fixes #3212 2015-09-14 20:30:55 +02:00
Araq
e01e0a4b40 next steps in binding [] properly 2015-09-13 22:42:21 +02:00
Araq
8ef66b973d first attempt to fix 'a[i]' handling in generics 2015-09-12 10:55:28 +02:00
Yuriy Glukhov
4ef4ad305c Fixed nimvm in generics. 2015-09-07 13:49:32 +03:00
Yuriy Glukhov
49869a2b10 when nimvm stmt proof of concept 2015-09-04 20:50:29 +03:00
Araq
bfd2fd67f9 tuple unpacking works in a non-var/let context 2015-08-21 21:34:14 +02:00
Araq
2f721f0d99 'parallel' now requires --experimental mode 2015-08-14 02:19:32 +02:00
Yuriy Glukhov
41a2a9f00b Fixes #3185 2015-08-06 22:19:33 +03:00
Araq
0d8942d45e destructors now work with overloaded assignment operators; fixes #2811; fixes #1632 2015-08-05 21:43:14 +02:00
Araq
ab26298a03 added system.unsafeAddr 2015-08-04 17:31:18 +02:00
Araq
b0b716fca7 fixes #3079, fixes #1146, fixes #2879 2015-07-22 16:32:56 +02:00
Araq
36ca2f1102 fixes #3051 2015-07-05 15:00:47 +02:00
Araq
28de800d61 Merge branch 'more_concurrency' into devel
Conflicts:
	doc/tut1.txt
	lib/core/locks.nim
	lib/pure/collections/tables.nim
	lib/pure/selectors.nim
2015-06-30 12:50:24 +02:00
Araq
afad61c220 fixes #2731 2015-06-26 00:05:29 +02:00
Araq
94f54700c4 first implementation of pinnedSpawn 2015-05-28 12:42:04 +02:00
Araq
e23857a98b fixes #2629, fixes #2641, fixes #2632, fixes #2630 2015-05-03 01:08:52 +02:00
Araq
26eae7d00e fixes #2470, fixes #1354 2015-04-28 20:21:53 +02:00
Araq
4550a2fb5c fixes #2602 2015-04-26 22:44:06 +02:00
Araq
4d20aafb5e fixes #2372 2015-04-25 23:16:57 +02:00
Araq
e55f5d1fd4 fixes #2505, fixes #1853, fixes #2522 2015-04-20 21:25:49 +02:00
Araq
49471440eb fixes #2481 2015-04-10 14:03:49 +02:00
Araq
05e39cf6ad overloading of '=' works 2015-04-06 23:21:52 +02:00
Araq
78f371c03a first implementation of overloading of '='; missing: rewriting let/var sections 2015-04-06 23:21:51 +02:00
Araq
165619552a fixes #2355 2015-03-28 00:47:03 +01:00
Araq
5d63ecb3a4 implemented a[^1] notation 2015-03-26 02:12:38 +01:00
Araq
43228a704f fixes #2404 2015-03-25 13:21:50 +01:00
Araq
08c0ba379a fixes #1805 2015-03-21 20:38:28 +01:00
Araq
0591c68aaf fixes #2369 2015-03-21 20:38:27 +01:00
Araq
16adfcdfa6 fixes #2366 2015-03-21 20:38:25 +01:00
Araq
4077f7d49c fixes #1791 2015-03-12 16:04:44 +01:00
Andreas Rumpf
df0473d754 Merge pull request #2239 from Maxdamantus/devel
interpret `tuple` as a class and `tuple[]` as the empty tuple, enable syntax for anonymous tuples
2015-03-07 17:35:14 +01:00
Araq
d58212ccc5 fixes #1940; code breakage! stricter template evaluation 2015-03-07 15:43:36 +01:00
Max Zerzouri
dba25d2622 enable syntax for anonymous tuples.
Turns out to be slightly problematic as `(int, int)` could be logically
thought of as an expression evaluating to a tuple value containing
two typedesc[int]s.

To disambiguate, the zero-tuple's type must still be written as
`tuple[]`, and what would be tuple value expressions containing only
typedescs are interpreted as types.

() # value of type `tuple[]`
(int, int) # tuple type
(int, int, ()) # value of type `(typedesc[int], typedesc[int], tuple[])`
2015-03-06 12:23:31 +13:00
Max Zerzouri
9c126282b2 interpret tuple as a class and tuple[] as the empty tuple
When the indentation syntax is allowed it is always interpreted as a
tuple:

type
  Unit = tuple
2015-03-06 12:20:15 +13:00
Araq
1e6aef62ba macros.PNimrodNode is now NimNode 2015-02-24 00:13:27 +01:00
Araq
1e796ed9d9 fixes #2051 2015-02-20 16:09:43 +01:00
Federico Ceratto
657dca5c3b Fix typos 2015-02-15 16:20:32 +00:00
Federico Ceratto
c95f6f117a Fix typos 2015-02-15 16:06:06 +00:00
Araq
4876aabb39 fixes #2113 2015-02-13 02:08:45 +01:00
Araq
c44d947ac5 'auto' can be inferred to be 'void' 2015-02-13 01:21:54 +01:00
Araq
3a8f7d505b temptyseqs works again 2015-02-10 20:19:45 +01:00
Araq
34b4e9fc96 fixes #2004 2015-02-08 15:43:50 +01:00
Araq
d933fde40d yet another C++ bugfix 2015-02-07 10:48:08 +01:00
Araq
74c6c8c903 compiler distinguishes between 2 different 'var' types for C++ interop; code cleanups 2015-02-07 10:48:07 +01:00