Files
Nim/tests/generics
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
..
2015-09-13 23:26:44 +02:00
2014-12-19 13:44:56 +01:00
2015-08-10 01:31:42 +02:00
2015-07-02 16:29:22 +02:00
2015-01-02 23:58:24 +02:00
2015-03-21 20:38:26 +01:00
2015-03-16 23:02:18 +01:00
2014-03-31 21:38:35 +02:00
2015-09-13 23:26:44 +02:00
2015-08-09 20:29:03 +02:00
2014-12-19 13:44:56 +01:00
2014-12-19 13:44:56 +01:00
2014-08-30 20:16:35 +02:00
2014-08-31 15:15:26 +02:00
2015-01-31 13:46:21 +01:00
2014-03-16 20:42:06 +02:00
2014-08-31 15:15:26 +02:00
2015-10-29 23:10:45 +01:00
2015-10-05 22:42:22 +02:00
2015-08-10 01:31:42 +02:00
2015-07-02 16:29:22 +02:00
2014-11-30 02:56:26 +01:00
2015-09-13 23:26:44 +02:00
2015-03-28 00:38:15 +01:00
2015-10-27 08:37:56 +01:00
2015-04-11 10:01:10 +02:00