Commit Graph

83 Commits

Author SHA1 Message Date
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
Andreas Rumpf
0d8a503e45 fixes #5597; wrong eager template instantiation in generic context (#5601) 2017-03-24 07:35:12 +01:00
andri lim
568c954062 fixes #5241, fixes #5411 inherit from specialized generic typeRel problem (#5573) 2017-03-23 23:39:29 +01:00
zah
be174fc3c7 Fix generic forward declarations; fixes #4104; fixes #4908 (#5566) 2017-03-23 12:40:57 +01:00
mfxmfx
8699372109 Correct the spelling of the word 'overridden'. (#5212) 2017-01-11 13:40:10 +01:00
Zahary Karadjov
bf612a7f19 fix #4884 2017-01-08 23:24:27 +02:00
Araq
49667798eb further progress; more tests are green 2016-11-28 21:45:29 +01:00
Andreas Rumpf
d0ec83eaa8 fixes #4863 2016-10-19 19:28:27 +02:00
Andreas Rumpf
f6a2ff731b fixes #4672 2016-09-01 13:02:53 +02:00
Andreas Rumpf
89f3e21fc8 fixes #4658 2016-08-26 13:02:52 +02:00
Andreas Rumpf
55e86184a5 fixes #4600 2016-08-23 01:29:30 +02:00
Andreas Rumpf
57b8664a0c fixes #4589 2016-08-10 11:14:02 +02:00
Andreas Rumpf
09f122f68c fixes #4528 2016-08-08 18:03:52 +02:00
Andreas Rumpf
24b72cebe7 make tests green again 2016-08-01 12:02:05 +02:00
Andreas Rumpf
089c31765f fixes #3055 2016-07-08 20:11:59 +02:00
Anatoly Galiulin
764668d099 Fix generics inheritance issues 2016-06-23 18:37:14 +06:00
Andreas Rumpf
e52044660d Merge branch 'patch/fix-3496-generic-tmpl-args' of https://github.com/nanoant/Nim into nanoant-patch/fix-3496-generic-tmpl-args 2016-05-29 23:58:25 +02:00
Andreas Rumpf
e04f319540 fixes #4084 2016-04-29 22:30:00 +02:00
Andreas Rumpf
e97d640ce8 fixes #3998 2016-03-28 02:26:38 +02:00
Andreas Rumpf
06d4131ce1 fixes #3669 2016-03-01 23:25:46 +01:00
Andreas Rumpf
c9966a3e17 use 'using' instead of 'sig' keyword; cleans up new features a bit 2016-02-29 12:19:54 +01:00
def
c50b5b62ef Fix a few deprecation warnings 2016-01-25 19:10:37 +01:00
Andreas Rumpf
0d4e52c648 makes tests green 2016-01-15 14:44:54 +01:00
Andreas Rumpf
35b65e6f4e Merge branch 'devel' into new-ll 2016-01-14 15:05:48 +01:00
Andreas Rumpf
6fbde1f4fb fixes another regression 2016-01-13 11:36:34 +01:00
Adam Strzelecki
f838c1baa4 fixes #3498
Previously it was not possible to use template arguments in template body as
the symbols were not resolved correctly leading to Error: undeclared
identifier: 'XX', eg.:

   template defaultOf[T](t: T): expr = (var d: T; d)
   echo defaultOf(1) #<- invalid identifier, but should output 0
2015-10-30 12:05:02 +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
86e2d6ee90 fixes #3476 2015-10-27 08:37:56 +01:00
Peter Mora
75097e2981 sequtils related changes 2015-10-05 22:42:22 +02:00
Peter Mora
925e7b0ca1 fixing TypelessParam warning in x=>x+1, added test 2015-09-22 18:34:43 +02:00
Araq
14354b436f fixes #2599 2015-09-13 23:26:44 +02:00
Adam Strzelecki
e80465dacf tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:04:32 +02:00
Araq
36a90c6044 fixes #1965 2015-08-10 01:31:42 +02:00
Araq
35f8cc0bdd fixes #2752 2015-08-09 20:29:03 +02:00
Araq
c733b3181e breaking change: symbol lookups in generics follows spec more closely; fixes #2664 2015-08-07 21:28:45 +02:00
Araq
0d8942d45e destructors now work with overloaded assignment operators; fixes #2811; fixes #1632 2015-08-05 21:43:14 +02:00
Araq
560cfd48fc fixes broken merge 2015-07-02 16:29:22 +02:00
Araq
cabbcd411d implements varargs[untyped]; refs #2545; to be documented 2015-07-02 16:18:11 +02:00
Araq
de5113805a tests\generics\tgenericprocmatcher.nim
disabled dubious constructs
2015-07-02 16:04:35 +02:00
r-ku
1a14e9d366 Fixes #3022 2015-06-30 17:52:18 +03:00
Araq
87f65f5e72 preparations for more Nimble packages; clear licensing; fixes #2949 2015-06-20 23:24:21 +02:00
patrick dw
69e15ac32f renamed writeln to writeLine in tests 2015-06-19 01:34:34 -05:00
Araq
d89a20cc1d fixes #2509 2015-04-11 10:01:10 +02:00
def
64903e7050 Use ^ instead of - in slices 2015-03-28 00:38:15 +01:00
Araq
508e8bd686 fixes #2221 2015-03-21 20:38:26 +01:00
def
fd4e629905 Rename PNimrodNode to NimNode 2015-03-17 17:50:32 +01:00
Araq
13cdad8819 fixes #2304 2015-03-16 23:02:18 +01:00
Araq
1efb5174f2 fixes #2220; #2219; breaks #2022; for #2022 callsite needs to be used 2015-03-10 12:32:46 +01:00
Hans Raaf
58186f6c1d Replaced deprecated repeatChar() with repeat() or spaces(). 2015-03-04 03:30:43 +01:00
Araq
2ebeb0bd21 fixes #2169 2015-02-28 20:13:21 +01:00