Commit Graph

2758 Commits

Author SHA1 Message Date
Araq
aa6353e4fa fixes #6843 2018-04-06 13:10:22 +02:00
Araq
824092be31 fixes a regression about static object case variant checking 2018-04-06 13:01:24 +02:00
cooldome
c34cb101b8 Fixes #7407 (#7427) 2018-04-06 10:53:21 +02:00
Dmitry Atamanov
cf6d41b51d Fixes #5281 (#7489) 2018-04-06 10:09:05 +02:00
Dominik Picheta
58dc8a399e Merge pull request #7450 from cabhishek/devel
Fixes #6902
2018-04-04 22:36:18 +01:00
Arne Döring
5d46e1eaa2 Fixes #7473 (#7475)
* removed code duplication
* changelog entry, adopt tests for changes
2018-04-04 15:37:07 +02:00
Dominik Picheta
7ef0cfebb5 Merge pull request #7495 from GULPF/fix-fill-bug
Fix algorithm.fill for empty input
2018-04-04 13:54:40 +01:00
Oscar Nihlgård
da077eea7c Move algorithm tests away from koch 2018-04-04 13:00:51 +02:00
Dominik Picheta
39c71d6211 Merge pull request #7336 from yglukhov/ipaddr-sockaddr-conversions
Conversion procs for (IpAddress, Port) <-> (SockAddr, Socklen)
2018-04-02 14:31:05 +01:00
data-man
759023e157 Comparing datetimes 2018-04-01 00:41:38 +03:00
Abhishek Kapatkar
c7cba5e6f0 Fixes #6902 2018-03-30 13:43:01 -07:00
Dominik Picheta
9c2cdc94a2 Fixes #7433. 2018-03-29 11:57:53 +01:00
cooldome
bcda71a8a7 fixes #7414 (#7434) 2018-03-29 09:19:03 +02:00
Araq
1d9343080d added toOpenArray builtin for zero-copy slices; syntax sugar yet to come 2018-03-24 20:26:34 +01:00
zah
121b9e26fb Static[T] fixes (#7333)
* fix the usage of unresolved static[T] parameters in proc signatures
* fix tsametype and tmacrogenerics
* Allow creating composite type classes with concepts and using them in type signatures
* Allow integers to be used in ident concatenations
* Support using imported C++ generic types in proc signatures
* fixes #7230
* closes #7379
* re-enable some metatype tests
2018-03-24 15:28:09 +01:00
Andreas Rumpf
299e944cf7 fixes the 'var T' checking 2018-03-24 10:10:28 +01:00
Andreas Rumpf
3be4f9111c enforce 'var T' produces a view into the first parameter; refs #7373 2018-03-24 09:41:04 +01:00
Andreas Rumpf
6f747674be more checking for 'var T' as return type; refs #7373 2018-03-24 08:37:09 +01:00
cooldome
e2c2ae8e7e fixes #7392 (#7395) 2018-03-23 13:28:22 +01:00
cooldome
23230572e2 Fixes #7363 (#7371) 2018-03-20 11:14:47 +01:00
Araq
e83bce3f13 disable flaky fragmenation test for AppVeyor 2018-03-19 17:42:52 +01:00
Araq
3979e83a59 fixes #7331 2018-03-18 17:56:28 +01:00
jcosborn
e39f2a9283 fix allocator corruption for large sizes (#7338)
* fix allocator corruption for large sizes
* allow large chunks to coalesce and added test case
* use correct constants in MaxBigChunkSize
2018-03-17 23:59:04 +01:00
andri lim
19164929ed fixes #7347, asyncfile.getFileSize (#7354)
* fixes #7347

* fixes #7347
2018-03-17 15:21:22 +00:00
cooldome
70b28a39fe Codegen: use type forward declarations more aggresively. Fixes #7339 (#7340)
Do not emit object definition it if used only by ref or ptr
2018-03-16 16:21:03 +01:00
PMunch
a9f21cffdf Add CommentStmt to astGenRepr (#7313)
* Added codeRepr and dumpCode to the macros module.

This allows those writing macros to write examples, get the code to generate the AST for that example, and then modify that code to be dynamic with the macro function.
2018-03-16 15:57:40 +01:00
andri lim
4f9f9ea528 fixes #7332 (#7341) 2018-03-16 15:32:01 +01:00
Yuriy Glukhov
1bd0efb067 Fixed crash/interface. Added tests. 2018-03-15 15:49:41 +02:00
zah
cbd059aa85 Fix #6415 (#7281)
* hangle static generic params when used in the importcpp pragma

* importcpp works for generic types with fields; fixes #6415

* revert a too agressive safety check that ended up breaking the tests
2018-03-08 15:10:45 +01:00
cooldome
63c28b973e Allow only single infix as in except branches. Fixes #7115 (#7132) 2018-03-08 10:56:32 +01:00
c-blake
551d7b7dc1 Add ability for users to elide ':' or '=' when CLI authors pass a (#7297)
* Add ability for users to elide ':' or '=' when CLI authors pass a
non-empty partial symbol table.  Behavior should be identical to the
old behavior if empty partial symbol tables are passed.  "Partialness"
of the symbol table refers to the fact that one need only specify
option keys that are toggles/booleans/do not take arguments, hence
the "NoArg" suffixes in shortNoArg and longNoArg.

commandLineParams() returns seq[TaintedString], so use that consistently
in getopt() and initOptParser(seq[TaintedString]) dropping the taint at
the quoting stage just as with the paramStr() logic.

Fix capitalization inconsistency of cmdLongOption.

Export OptParser.cmd and OptParser.pos so that, at least *in principle*,
users of this API can handle "--" option processing termination or some
"git-like" sub-command stop word with a separate option sub-syntax.
{ Eg., ``case p.key of "": echo "trailing non-option args: ", p.cmd[p.pos..^1]``
or ``case p.kind of cmdArgument: if p.key == "mysubcmd": ...``. }  Really,
searching for the last delimiter before p.pos is probably needed to frame
the trailing text..Not the nicest API, but still possible with effort.

* Make requested changes from string to seq[char]
(see https://github.com/nim-lang/Nim/pull/7297)

* Document new behavior and elaborate on some special cases.

* NoArg => NoVal to be less ambiguous/more clear.

* Add more documentation and an example snippet.

* Tweak language. Clarify still using ':'/'=' is ok.

* Add a test case for new NoVal behavior.
2018-03-08 08:12:34 +01:00
Andreas Rumpf
eeea000582 make the 'canimport' template work 2018-03-06 15:57:46 +01:00
cooldome
4790b6d63f Fixes 7283 (#7284) 2018-03-05 19:06:47 +01:00
Araq
15e044416f fixes #7291 2018-03-05 13:38:32 +01:00
Dominik Picheta
363c703e72 Merge pull request #7289 from alehander42/fix-asyncjs-pragma
Stop replacing all pragmas of a function with asyncjs
2018-03-05 11:12:01 +00:00
Alexander Ivanov
b6c69dd45e Use addPragma 2018-03-05 10:28:17 +02:00
twetzel59
9079517d71 Resolves #5588: adds openFileStream proc that throws on failure (#7282) 2018-03-04 17:30:28 +01:00
Alexander Ivanov
3bffbf5a4d Stop replacing all pragmas of a function with asyncjs 2018-03-03 16:53:28 +02:00
cooldome
4164ec4f8b Fixes #6837 (#7271) 2018-03-02 12:14:41 +01:00
Araq
dd7c166260 make tests green again 2018-02-28 10:13:55 +01:00
Araq
c9f184401c merged #6512 manually; fixes #6431 2018-02-27 17:43:02 +01:00
Alexander Ivanov
9c7374abcd Fix return (#7225) 2018-02-27 15:23:19 +01:00
cooldome
0a8684db4c User pragmas hide effect specs bug fix. Fixes #7216 (#7217) 2018-02-27 03:03:49 +01:00
Araq
6d4107b783 make the allocator take a special path for allocations bigger than 2GB; fixes #7120 2018-02-27 01:46:52 +01:00
Andreas Rumpf
3bf1ce008f fixes #7236 2018-02-26 10:51:56 +01:00
Andreas Rumpf
b35ee82c48 fixes #6992 2018-02-25 17:28:47 +01:00
Oscar Nihlgård
e4515f304a Improve semchecking for duplicate cases in case statements (#7176)
* Improve semchecking for duplicate cases in case statements

* Revert to previous solution

* Improve test
2018-02-24 14:56:17 +01:00
Andreas Rumpf
3dab0877da fixes #7247 2018-02-23 11:42:19 +01:00
cooldome
45d3e2e510 genTryCpp codegen. Fixes #7232. Fixes #7239 (#7240) 2018-02-22 09:58:56 +01:00
Araq
1d1ba4481f Merge branch 'devel' of github.com:nim-lang/Nim into devel 2018-02-20 01:16:09 +01:00