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
data-man
b30b920751
Fix date parsing for a bad inputs
2018-02-19 16:57:17 +03:00
Araq
5fe0c386ea
disable symbol file tests for the old symbol file implementation
2018-02-19 13:19:43 +01:00
Dominik Picheta
411b9aeac7
Merge pull request #7228 from endragor/fix-asyncfile-open
...
Fix AsyncFile open flags. Fixes #5531
2018-02-17 12:08:09 +00:00
Ruslan Mustakov
319e88585a
Fix AsyncFile open flags. Fixes #5531
2018-02-17 17:40:35 +07:00
Araq
843bb50a8b
tfragment_gc test: make more robust
2018-02-13 13:11:19 +01:00
cooldome
d24b6667c6
genTryCpp to catch by Nim type, ready for first review ( #7196 )
...
* Rewrite genTryCpp
* correction
* Implement polymorphic raise in cpp
* revert backticks in emit
* Cleanp a comment
* revert test changes
* better handling of <new> header
2018-02-12 21:23:34 +01:00
cooldome
7cbab49645
nested finally bug ( #7207 )
2018-02-12 21:20:49 +01:00
Araq
4c702d5ab2
Merge branch 'devel' into araq-fixes-6960
2018-02-12 18:55:41 +01:00
Dominik Picheta
23d272f652
Merge pull request #7205 from GULPF/json-to-fix
...
Fix `json.to` for types with generic parameters
2018-02-12 09:22:35 +00:00
Oscar Nihlgård
8247323860
Fix json.to for types with generic parameters
2018-02-11 23:15:04 +01:00
Andreas Rumpf
a4deceb134
fixes #6186
2018-02-11 14:52:26 +01:00
Andreas Rumpf
358709e9cb
fixes #6960
2018-02-11 13:55:56 +01:00
Araq
2c1f1f21bf
fixes #3985
2018-02-10 21:20:48 +01:00
Araq
b57d14b1ae
make more tests green
2018-02-10 20:55:22 +01:00
Araq
ef6eda4cb4
better error messages: use <T1, T2> instead of (T1, T2) in order to prevent confusions with tuple types
2018-02-10 20:55:21 +01:00
cooldome
51d81c4e23
Fixes #6853 ( #7188 )
...
* Fixes #6853
* Add a test for a const empty array
2018-02-10 16:44:41 +01:00
Araq
45437eb113
fixes #4220
2018-02-10 14:20:31 +01:00
Araq
5c5e54d3a9
fixes #7153
2018-02-10 14:09:04 +01:00
Andreas Rumpf
2199f83280
improve error message for twrongcolon
2018-02-06 09:15:54 +01:00
Andreas Rumpf
d72578b3dd
more chatty error message for the 'discard' checking
2018-02-05 16:49:06 +01:00
Andreas Rumpf
326b7dc556
improve the error messages regarding type mismatches in overloading resolution
2018-02-04 07:04:50 +01:00
Andreas Rumpf
4e0b3fefa3
Merge branch 'devel' into araq-overloading-symmetry
2018-02-03 07:58:31 +01:00
Andreas Rumpf
992fd38487
make tests green again
2018-02-03 07:57:47 +01:00
Andreas Rumpf
1b22a3b346
disabled non-documented overloading rule for templates and macros
2018-02-02 11:00:42 +01:00
Andreas Rumpf
bd1dfa4b38
better type inference for numerical types; prerequisitive for version 1
2018-02-02 09:29:05 +01:00
pqflx3
8d8df5807b
Fixes #7121 ( #7148 )
...
* Replace ftell and fseek with (windows) _ftelli64, _fseeki64 and (posix) ftello, fseeko
* disable large file test
2018-01-31 16:38:37 +01:00
GULPF
94038545be
Fixes codegen bug with literal negative zero, fixes #7079 ( #7158 )
...
* Fixes #7079
* Fix handling of neg zero during constant folding
2018-01-31 16:29:42 +01:00