Commit Graph

17607 Commits

Author SHA1 Message Date
Miran
749dbce4c6 Merge tests into a larger file (part 5 of ∞) (#9368)
* merge magics

* merge metatype tests

* merge method tests

* merge objects tests

* change `import future` to `import sugar`

Nim in Action tests are left with `import future`, to ensure compatibility.

* merge overload tests

* merge proc tests

* merge procvar tests

* merge range tests

* merge seq tests

* merge sets tests

* remove wrong assert from `tsets3`

* fix `jsTests`

* better fix
2018-10-16 10:50:10 +02:00
skilchen
f04c93b5dd math.round is not needed in strutils (#9383) 2018-10-16 09:19:53 +02:00
Araq
0c04da6f26 Merge branch 'devel' of github.com:nim-lang/Nim into devel 2018-10-15 12:20:52 +02:00
Araq
bf01d7136e Merge branch 'Fixes-7845' of https://github.com/cooldome/Nim into cooldome-Fixes-7845 2018-10-15 11:50:12 +02:00
Araq
8252c65cf2 system.nim deprecate 'getRefcount'; refs #2839, refs #3713 2018-10-15 10:54:20 +02:00
Araq
37986d0ba8 ospaths docs: add 'basename' to theindex 2018-10-15 10:51:47 +02:00
Araq
f8e805a614 fixes #2760 2018-10-15 10:43:56 +02:00
Araq
fe091997aa system.nim: fixes typo 2018-10-15 02:38:04 +02:00
Timothee Cour
3bef851143 fix #8225 os.isHidden was buggy on posix (#8315)
* fix #8225 isHidden was broken on posix

* scope rest of tos.nim under blocks to avoid variable scope bugs
2018-10-15 00:22:34 +02:00
Andreas Rumpf
b39302b0d2 DFA: implement exception handling properly 2018-10-14 17:36:55 +02:00
Miran
a30ba8cc37 merge macros tests (#9367) 2018-10-14 17:08:42 +02:00
Andreas Rumpf
8955470644 fixes #9306 properly, fixes #9306 2018-10-14 11:19:51 +02:00
Federico Ceratto
b62328cb76 Add strip() example (#8002) 2018-10-14 11:05:28 +02:00
Andreas Rumpf
8960efa340 unicode: added strip, align, alignLeft, repeat procs; refs #6301 2018-10-14 11:00:22 +02:00
Andreas Rumpf
77a8c6ffd8 unicode: add split procs; refs #6301 2018-10-14 10:47:54 +02:00
Andreas Rumpf
152c7d99c3 struils: don't use the deprecated accumulateResult 2018-10-14 10:28:50 +02:00
Andreas Rumpf
7656925140 added new editdistance stdlib module, deprecated strutils.editDistance, refs #6301 2018-10-14 10:26:45 +02:00
Andreas Rumpf
7f81519f41 strutils/unicode: deprecate isLower and friends operating on complete strings; fixes #7963 properly 2018-10-14 09:48:54 +02:00
LemonBoy
4808ef72db [WIP] Early evaluation of mIs (#8723)
* Early evaluation of mIs

The `evalIs` implementation was just a broken copy of `isOpImpl` so
let's just avoid it alltogether: `mIs` nodes are either resolved during
the semantic phase or bust.

* Remove dead code and tidy it up
2018-10-14 08:53:41 +02:00
Miran
9f8b93641e Merge tests into a larger file (part 3 of ∞: generics) (#9347)
* merge generics issues tests
* merge tgeneric
* merge test with local imports
* merge tcan tests
* merge matcher tests
* more issue tests merged
* one more tcan test
* merge various small tests into one file
* add a test for #3717
2018-10-14 08:50:39 +02:00
Vindaar
afd5abdfc2 add issue #5707 as test case (#9361) 2018-10-14 08:44:57 +02:00
Josh Goebel
38454c6951 Fix type in docs (#9362) 2018-10-14 08:44:36 +02:00
Timothee Cour
eb946f37a7 fixes #8671; show helpful msg (lookup symbol, eg iterator) on 'attempting to call undeclared routine' error (#8786) 2018-10-14 01:16:04 +02:00
Araq
8232bd04f9 sizeof(UncheckedArray) should be invalid; fixed the formating of sizealignoffsetimpl.nim to make it bearable 2018-10-14 00:58:43 +02:00
Timothee Cour
745f1642d6 implement sizeof and alignof operator (manually squashed #5664) (#9356) 2018-10-14 00:52:28 +02:00
Timothee Cour
3e2d8c1c53 correctly render AST in doAssert/assert condition: fixes #8518; refs #9301 (#9332)
* fixes #8518; refs #9301; correctly render AST in doAssert condition
2018-10-14 00:17:10 +02:00
LemonBoy
166720bdf9 Make sure the annotation for || is avail. at CT (#9354)
Closes #9353
2018-10-14 00:00:21 +02:00
Miran
d570dea480 put several issues in tests (#9352)
* put several issues in tests

* remove wrong test
2018-10-13 20:17:59 +02:00
Federico Ceratto
e435dbd35e Update makefile and buildsh templates for riscv64 (#9351) 2018-10-13 17:18:06 +02:00
Timothee Cour
e4c76f8a2a add strutils.stripLineEnd (#9346) 2018-10-13 14:59:56 +02:00
Miran
3c9fcc4c30 Merge tests into a larger file (part 2 of ∞) (#9335)
* merge controlflow tests

* merge distinct tests

* merge enum tests

* merge fields tests

* merge implicit tests

* merge iter issues tests
2018-10-13 14:58:31 +02:00
Timothee Cour
ef820769a4 deprecate accumulateResult => sequtils.toSeq (#8666) 2018-10-13 09:23:33 +02:00
Tomohiro
eb4272ba1c manual: Fix links to Parallel & Spawn (#9342) 2018-10-13 08:55:34 +02:00
Vindaar
9cdd9be5a5 fixes #8916 by fixing typeinfo and marshal. (#9341)
* fixes #8916 by removing `tyString`, `tySeq`, mod. marshal, typeinfo

Need to check in `typeinfo` for nil of the underlying pointer.
In marshal don't have to check for nil of seq anymore.

* remove reference to string, sequence in `isNil` doc string
2018-10-13 08:47:58 +02:00
Oscar Nihlgård
c495e97ec4 Build codeowners.rst (#9337) 2018-10-13 08:44:39 +02:00
Timothee Cour
d5fe8e1e0c doc: tests/testament/specs.nim => testament/specs.nim (#9338) 2018-10-13 08:41:47 +02:00
Andreas Rumpf
1475697fbf make tests green again 2018-10-13 08:39:56 +02:00
Andreas Rumpf
33cdae8c32 dfa.nim: clarify exception handling 2018-10-13 08:28:56 +02:00
Andreas Rumpf
fcca59e415 destructors: optimize more assignments into moves; also fixes #9294 2018-10-12 20:36:42 +02:00
Andreas Rumpf
2fecf4f36a compiler: cleanup dfa.nim 2018-10-12 19:56:51 +02:00
Andreas Rumpf
dcc3ac74f4 don't crash when rendering wrong nkInfix nodes 2018-10-12 19:22:39 +02:00
c-blake
1b3725e395 Add toOpenArray[T](ptr UncheckedArray[T]) for clarity. (#9316)
* Add `toOpenArray[T](ptr UncheckedArray[T])` for clarity.  `ptr array[0,T]`
for some unchecked type already works but A) `UncheckedArray` seems to be
the intended future way for this kind of access, and B) essentially all use
cases will have a `ptr` for that kind of array source and this call signature
lets callers drop the trailing `[]` corresponding to that `ptr` deref.
This PR relates to issue https://github.com/nim-lang/Nim/issues/9001 .

* Add a test for toOpenArray() for UncheckedArray[T]s.
2018-10-12 17:40:07 +02:00
eqperes
14925ee8b6 Proposed solution for issue #8919 (#9280)
* Proposed solution for issue #8919

* count sub/subs must be non-empty
2018-10-12 17:28:21 +02:00
Jacek Sieka
97738a4f28 Testament pre parallel (#9137)
* testament: move to root dir (it's not a test)

* osproc: fix process index passed to afterRunEvent for parallel runs

it was passing the index of the process, not index of all commands

* testament: complete file move
2018-10-12 17:27:47 +02:00
Miran
c492a7fd83 complete removal of web folder, fixes #9304 (#9310)
* complete removal of web folder, fixes #9304

* remove `buildJS`
2018-10-12 17:27:04 +02:00
Miran
7f18d7cbc1 Merge tests into a larger file (part 1 of ∞) (#9318)
* merge actiontable tests

* merge arithm tests

* merge array tests

* merge assign tests

* merge bind tests

* merge casestmt tests

* merge closure tests

* merge cnt seq tests

* merge collections tests

* merge concept issues tests

* merge concept tests

* fix failing tests

* smaller outputs

Use `doAssert` where possible.

* fix wrong output

* split `tcomputedgoto`

* revert merging concepts

* fix failing test
2018-10-12 17:02:46 +02:00
Tomohiro
d2b04a8bc7 manual: Remove stmt or expr template related text from manual (#9321) 2018-10-12 09:00:27 +02:00
LemonBoy
71636059e9 Avoid memory allocation during dynlib loading (#9320)
By using `write` instead of `rawWrite` we'd end up asking the compiler
to generate the GC dynlib _while_ we were already generating another
dynlib!

Fixes #9123
2018-10-12 08:56:14 +02:00
LemonBoy
fab4d38411 string to string conversion keeps the dest type (#9323)
Fixes #9322
2018-10-12 08:50:28 +02:00
cooldome
9b002e0d4f Align to the actual experience (#9324)
* Align to the actual experience

* add exception handling
2018-10-12 08:49:33 +02:00