summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* system.nim: remove deprecated symbolsAndreas Rumpf2018-06-282-18/+2
|
* Fix template codegen with static parameters (#8110)LemonBoy2018-06-271-1/+5
| | | | | | | | * Fix template codegen with static parameters Fixes #7477 * Move the test case to tstaticimportcpp
* Return an error symbol as macro output if needed (#8116)LemonBoy2018-06-271-0/+8
| | | | | | Return an error symbol if the macro output has no type and a typedesc is expected. Fixes #7454
* Reject ptr/ref void types (#8127)LemonBoy2018-06-271-0/+7
| | | | | Do this during the semantic pass to avoid tripping the following passes. Fixes #6454
* Reject enums with holes when computedGoto is used (#8132)LemonBoy2018-06-271-0/+15
| | | Fixes #7699
* Don't consider concept types as non-complex during codegen (#8119)LemonBoy2018-06-271-1/+14
| | | Fixes #7125
* Lexer: do not accept some invalid integer literals (#8089)Hiroki Noda2018-06-272-0/+14
| | | | | | * Lexer: do not accept some invalid integer literals * Use Natural instead of uint, and result variable
* Merge pull request #7736 from cooldome/range_float_typeAndreas Rumpf2018-06-271-0/+49
|\ | | | | Language feature: range float types
| * merge develcooldome2018-06-1211-28/+317
| |\
| * \ merge develcooldome2018-06-1086-642/+1817
| |\ \
| * \ \ Merge branch 'devel' into range_float_typecooldome2018-04-3010-1781/+10
| |\ \ \
| * \ \ \ merge develcooldome2018-04-298-8/+192
| |\ \ \ \
| * | | | | update testcooldome2018-04-291-1/+13
| | | | | |
| * | | | | Add a testcooldome2018-04-291-0/+37
| | | | | |
* | | | | | Merge pull request #7681 from nim-lang/typedesc-reformsAndreas Rumpf2018-06-2614-22/+1021
|\ \ \ \ \ \ | | | | | | | | | | | | | | Typedesc reforms
| * \ \ \ \ \ Merge branch 'devel' into typedesc-reformsAndreas Rumpf2018-06-2617-2/+877
| |\ \ \ \ \ \
| * | | | | | | allow referencing other parameters in default parameter valuesZahary Karadjov2018-06-161-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix #7756 fix #1201 fix #7000 fix #3002 fix #1046
| * | | | | | | fix #6928; fix #7208Zahary Karadjov2018-06-161-0/+21
| | | | | | | |
| * | | | | | | Support default type parametersZahary Karadjov2018-06-161-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | progress on #7516
| * | | | | | | fixes #7222; fixes #5595; fixes #3747Zahary Karadjov2018-06-164-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * late instantiation for the generic procs' default param values * automatic mixin behaviour in concepts Other fixes: * don't render the automatically inserted default params in calls * better rendering of tyFromExpr
| * | | | | | | Implement the `is` operator for the new static and typedesc type classesZahary Karadjov2018-06-166-30/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also makes the first baby steps towards a sound treatment of higher-order kinds (type type int). Adds test cases showcasing the new features. * Also fixes breakage after the rebase
| * | | | | | | Bugfix: the size of an array may be a static tuple elementZahary Karadjov2018-06-161-7/+33
| | | | | | | |
| * | | | | | | Bugfix: aliases to generic types were not considered implicit generic parametersZahary Karadjov2018-06-161-0/+17
| | | | | | | |
| * | | | | | | A minimal patch enabling the new typedesc and static types syntaxZahary Karadjov2018-06-162-54/+100
| | | | | | | |
| * | | | | | | Starting test recording the current state of the parserZahary Karadjov2018-06-161-0/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the next commit, I'll introduce changes to the parser bringing consistent handling of all type modifiers (ref, ptr, var, static and type). The goal of this commit is to record precisely what is going to be changed (i.e. by allowing you to look at the diff). To preserve the diff, please don't squash upon merging.
* | | | | | | | Merge pull request #8108 from LemonBoy/fix-5958Andreas Rumpf2018-06-264-15/+21
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Make `static` blocks introduce their own scope
| * | | | | | | | Adjust some tests to make them passLemonBoy2018-06-253-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-scoped behaviour of static blocks was exploited by those tests, replace all the variables declared whithin one with compileTime marked ones.
| * | | | | | | | Make `static` blocks introduce their own scopeLemonBoy2018-06-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Treat the static block as a normal block, don't leak any identifier in the outer scope. Fixes #5958
* | | | | | | | | Improve vm support for ref typesOscar Nihlgård2018-06-262-1/+53
| |_|/ / / / / / |/| | | | | | |
* | | | | | | | More concept fixesLemonBoy2018-06-241-0/+31
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | Fixes #7705, #7703, #7702
* | | | | | | Merge pull request #8084 from LemonBoy/fix-7905Andreas Rumpf2018-06-241-0/+33
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Discriminate gensym'd type names in sigHash
| * | | | | | | Don't blow up with recursive objectsLemonBoy2018-06-221-0/+15
| | | | | | | |
| * | | | | | | Discriminate gensym'd type names in sigHashLemonBoy2018-06-221-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The root cause of #7905 lies in the codegen phase. The two template instantiations generate two different MyType types with different members but same t.sym.name leading the caching mechanism to confuse the two. Fixes #7905
* | | | | | | | Merge pull request #8062 from LemonBoy/fix-7825Andreas Rumpf2018-06-212-0/+92
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix constant folding for shl/not
| * | | | | | | | Fix constant folding for shl/notLemonBoy2018-06-192-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the source and destination types are the same the result should be trimmed to fit.
* | | | | | | | | Pegs AST read access (#8050)gemath2018-06-191-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make PEG AST nodes readable from outside the module. * Added a test module for the pegs stdlib module. * Edited changelog. * Renamed ``sons`` iterator to ``items``, added ``pairs``, inlined both. * Updated entry and moved it to the right category.
* | | | | | | | | Merge pull request #7771 from nim-lang/nim-in-action-fixesAndreas Rumpf2018-06-1911-1/+642
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | Higher Nim in Action coverage plus regression fix.
| * | | | | | | | Workaround VM bug in strutilsDominik Picheta2018-06-171-2/+2
| | | | | | | | |
| * | | | | | | | Adds smaller code samples from Chapters 1-3 to the tester.Dominik Picheta2018-06-1711-1/+642
| | |/ / / / / / | |/| | | | | |
* / | | | | | | testament: minor code formating changeAndreas Rumpf2018-06-171-1/+1
|/ / / / / / /
* | | | | | | Merge pull request #8039 from yglukhov/proc-pragmasAndreas Rumpf2018-06-161-6/+69
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Fixed stacktrace/linetrace proc pragmas when appended by macro pragma
| * | | | | | Added more tests to toverflwYuriy Glukhov2018-06-151-6/+69
| | | | | | |
* | | | | | | Add MemMapFileStream. Fixes in memFiles. (#7944)Dmitry Atamanov2018-06-142-1/+55
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add MemMapFileStream * Added tests * Fixed bug in memfiles (zero index for string) * Added flush to changelog * Attempt to fix Win's nuances * Fix attempt to fix * Continue... * And again... * Reworked tests (all for win on Win) * Fixes in flush (Win) * Replace fn vars to consts * Added the attempts parameter to the flush * Replace while to for * Move to memfiles * Use Natural instead of uint * Better error messages for append mode. Handle specific cases.
* | | | | | Add parse bin int, fixes #8018 (#8020)Vindaar2018-06-131-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * clarify `parseHexInt`, `parseOctInt` docstring and exception msgs * add `parseBinInt` based on `parseutil.parseBin` implementation Adds a `parseBinInt`, which parses a binary integer string and returns it as an integer. This is based on the implementation of `parseutil.parseBin`, removing the unnecessary parts. * add tests for all `parse(Hex|Oct|Bin)Int` procs * replace `parse*Int` proc impls by call to parseutil procs Replaces the `parse(Hex|Oct|Bin)Int` procedure implementation by calls to the `parseutil` procs, which receive a mutable argument. Has the main advantage that the empty string as well as a "prefix only" string, e.g. "0x" counts as an invalid integer. Also moves the `parseOctInt` proc further up in the file so that all `parse` procs are below one another. * replace `var L` by `let L` in `parse` procs There's no reason for the usage of `var` here. * add `maxLen` optional arg for `parseutil.parse(Oct|Bin)` Plus small change to test cases. * update changelog about `parse*Int` procs * fix `rejectParse` template in `tstrutils` * make sure only `s.len` chars are parsed, if `maxLen+start` > s.len Fixes a previous bug in `parseHex` (and now affected `parseOct` and `parseBin`), which allowed to set `start + maxLen` to be larger than the strings length. This resulted in an out of bounds access. * move `parse*Int` proc change to breaking changes, add double `
* | | | | | fix #5930Arne Döring2018-06-131-2/+2
| |_|_|_|/ |/| | | |
* | | | | Merge pull request #8019 from yglukhov/proc-stacktraceAndreas Rumpf2018-06-121-0/+18
|\ \ \ \ \ | | | | | | | | | | | | Allow stacktrace and linetrace pragmas on procs
| * | | | | Allow stacktrace and linetrace pragmas on procsYuriy Glukhov2018-06-121-0/+18
| | | | | |
* | | | | | Merge pull request #7981 from cooldome/Fix_-7980Andreas Rumpf2018-06-121-0/+27
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Fixes 7980
| * | | | | fixes 7980cooldome2018-06-061-0/+27
| | | | | |
* | | | | | Merge pull request #8014 from yglukhov/fix-6803Andreas Rumpf2018-06-111-6/+118
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fixes #6803