Commit Graph

4612 Commits

Author SHA1 Message Date
flywind
eb2ed782c6 add testcase for #8012 (#15785)
(cherry picked from commit 2de90a14cb)
2020-11-05 09:08:42 +01:00
flywind
dc6073b0b8 add testcase for #9165 (#15787)
(cherry picked from commit 1655c04aa3)
2020-11-05 09:08:38 +01:00
flywind
3d939dd863 add testcase for #9091 (#15791)
* add testcase for #9091

* more tests

(cherry picked from commit b5df823191)
2020-11-05 09:08:19 +01:00
flywind
d426f75593 fix #15638 (#15789)
(cherry picked from commit f79ded3cb6)
2020-11-05 09:08:14 +01:00
flywind
051c201068 add testcase for #7127 (#15780)
(cherry picked from commit d8fb2379c9)
2020-11-05 09:08:01 +01:00
flywind
b0291b88fc add tests for #7686 (#15771)
(cherry picked from commit 33e258c72f)
2020-11-05 09:07:51 +01:00
Andreas Rumpf
645200aa3d fixes #15413 (#15768)
* fixes #15413

* better hide it properly

* see if this makes our list of important packages happy

(cherry picked from commit 87a60c1b28)
2020-11-05 09:07:36 +01:00
cooldome
e39b01e126 fix #15756 (#15761)
* fix #15756

* simplify test

(cherry picked from commit 610e9b2fe9)
2020-11-05 09:06:45 +01:00
cooldome
a4f9bc55c7 ARC now capable of custom extra alignment. Ref, closure and seq support. (#15697)
(cherry picked from commit 0956a99537)
2020-11-05 09:06:39 +01:00
narimiran
e27f595aee change/remove deprecated stuff
(cherry picked from commit 732ddc02da)
2020-11-05 09:06:07 +01:00
narimiran
96bd6426c2 fix #15750
(cherry picked from commit b13fb9ddb8)
2020-11-05 09:05:46 +01:00
cooldome
afb5212fe0 fix #15752 (#15754)
(cherry picked from commit f8cac6bbbc)
2020-11-05 09:05:39 +01:00
shirleyquirk
5c48058c86 fixes #10456,#12928 issues when chaining templates to sortedByIt (#15734)
* update c_malloc's to csize_t

fix for broken --os:ios

* I'm an idiot sorry

* Create talgorithm.nim

* workaround for #10456

I don't understand the intricacies of how lambdalifting and template expansions interact with lent, so i don't know how to fix the real problem, but this sidesteps whatever issue that is.

* working test, use typeof rather than auto

(cherry picked from commit 218acfe367)
2020-11-05 09:05:21 +01:00
n5m
33375aff15 add tests for Testament "reject" action (#15709)
* add test for reject action

* highlight that a compilation failure is expected

* add the converse test for action=reject

* add trailing newline

* fix wording

(cherry picked from commit 066f3ebc2a)
2020-11-05 09:04:57 +01:00
Timothee Cour
3326f1df1d [backport] fix #15595 procvar == works in VM (#15724)
(cherry picked from commit 3bdc000521)
2020-11-05 09:03:47 +01:00
Andreas Rumpf
a156484553 ensure the Nim compiler works with --experimental:strictFuncs --experimental:views [backport:1.4] (#15737)
(cherry picked from commit cf01945f54)
2020-10-27 09:06:45 +01:00
Timothee Cour
4e91c11eff fix #15704 #15597 wrong VM register was freed (#15705)
* fix #15704 #15597 wrong VM register was freed

* same treatment for nkCheckedFieldExpr

* note concerning HighRegisterPressure

* bump NimPatch

* Update lib/system.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
(cherry picked from commit d4c2e2c53f)
2020-10-27 09:00:51 +01:00
Timothee Cour
9d81415603 close #8007 (#15695)
(cherry picked from commit bf894ad3eb)
2020-10-27 09:00:48 +01:00
Danil Yarantsev
60ddbf1e45 Add tests to #15363 (#15633)
(cherry picked from commit d22ab0fb96)
2020-10-27 08:59:52 +01:00
Clyybber
9e8ad86d6a Revert "fixes #15280 [backport:1.2] (#15281)" (#15700)
This reverts commit 3f00a738db.

(cherry picked from commit d4022ebe53)
2020-10-24 17:16:02 +02:00
cooldome
d1924f2852 fix #15662 (#15678)
* fix #15662

* alternative fix

* fix spacing

(cherry picked from commit ae320b4e7d)
2020-10-24 17:15:08 +02:00
Clyybber
7a9db0e5c5 Fix #12410 (#15685)
* Fix #12410, big thanks to @pmetras for this fix

* Add testcase

(cherry picked from commit 01a62320f0)
2020-10-24 17:14:49 +02:00
Andreas Rumpf
e7b7356bd1 fixes view types for sizeof() and --gc:orc (#15680)
(cherry picked from commit 64016ddedc)
2020-10-22 20:21:49 +02:00
n5m
06846d23ad expect valgrind test failure on memory leak (#15669)
* expect valgrind test failure on memory leak

* alloc 1 instead of 0

(cherry picked from commit 8da0e01769)
2020-10-22 20:20:15 +02:00
Timothee Cour
11ef97d57f $(uint|uint64) now works with nimscript (#15644)
* $(uint|uint64) now works with nimscript

* fixup

(cherry picked from commit 3cbe8d2c53)
2020-10-21 11:08:43 +02:00
n5m
1d63995896 fix #15631 (#15632)
* trigger valgrind failure on memory leak

* remove non-malloc tests

* remove ORC test

is redundant because we already have an ARC test

* only run valgrind tests on 64-bit Linux

* disable freebsd and openbsd

* Remove tleak_refc

As to not test implementation details (or bug)

* Fix test failures by removing redundant test

Since this tests/shoulfail/tvalgrind.nim was specified here to fail this test
itself fails since it will be skipped on non-linux CI

* Remove test, reason detailed in the previous commit

* Remove redundant disables

* Revert removing disables

* Add and use valgrind: leaks

* Fix

Co-authored-by: Clyybber <darkmine956@gmail.com>
Co-authored-by: n5m
(cherry picked from commit 436e1fa5b1)
2020-10-21 11:03:17 +02:00
n5m
642807de18 add tests for #15584 (#15619)
* add test for #15584

* Rename userlocks.nim to trlocks.nim

* add bug comment

* improve cmd

* reference bugfix, not bug

* add test that runs rlocks

* disallow joining

joining with other test cases (e.g., a test case that invokes `RLock.initRLock()`) may cause this test to compile, when the goal is to test if these lines can be compiled in isolation

(cherry picked from commit 78cbb52fa0)
2020-10-21 11:00:33 +02:00
Clyybber
d86d7c9fe1 Fix #15599 (#15601)
* Fix #15599

* Add test

(cherry picked from commit 66cd9c2e57)
2020-10-21 10:58:57 +02:00
Andreas Rumpf
da4aa2e1fb renamed '=' to '=copy' [backport:1.2] (#15585)
* Assign hook name changed to `=copy`
* Adapt destructors.rst
* [nobackport] Duplicate tests for =copy hook
* Fix tests
* added a changelog entry

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-10-15 12:52:30 +02:00
Andreas Rumpf
1bbc20010e harden the ORC asyncleak3 test case (#15580)
* harden the ORC asyncleak3 test case

* add another ORC stress test
2020-10-15 09:42:43 +02:00
Andreas Rumpf
8978112457 fixes a C code generator regression, no need to backport, only the 1.4 line is affected (#15569) 2020-10-14 13:58:36 +02:00
alaviss
d1af9587b8 terminal: fix fgColor/bgColor commands [backport] (#15554)
Since #8296, fgSetColor is no longer a global. These commands were
probably left out from the change as an oversight, so some tests have
been added to make sure this won't happen again.
2020-10-13 17:39:32 +01:00
cooldome
9668a1106d Fix 15543 (#15544)
* fix #15543

* fix spacing

* fix test

* simplify test for freebsd platform
2020-10-12 10:12:32 +01:00
Timothee Cour
3eac9b2344 os: add overload copyFile*(source, dest: string, isDir = false) (#15537)
* os: add overload copyFile*(source, dest: string, isDir = false)
* renamed to copyFileToDir
2020-10-11 20:43:01 +02:00
Timothee Cour
8a5f550491 followup after #15529 and #15534 (#15536) 2020-10-10 07:05:27 +02:00
Andreas Rumpf
d430216288 fixes #15532 (#15534) 2020-10-09 16:18:36 +02:00
Timothee Cour
8fb57d7451 close #13081 (#15529)
* close #13081

* fixup
2020-10-09 08:56:09 +02:00
cooldome
fe187719ab fix #15516 (#15518) 2020-10-08 09:12:03 +02:00
Andreas Rumpf
3b901d1e36 docgen: improve alignment of comments (still not perfect) (#15506)
* docgen: improve alignment of comments (still not perfect)

* fix error message text in `tunknown_named_parameter`

Co-authored-by: narimiran <narimiran@disroot.org>
2020-10-07 14:39:13 +02:00
Andreas Rumpf
0426a4d85a fixes #15508 (#15509) 2020-10-07 14:38:25 +02:00
Andreas Rumpf
51e3e0c7c4 implements https://github.com/nim-lang/RFCs/issues/260 (#15505)
* implements https://github.com/nim-lang/RFCs/issues/260

* added a test case
2020-10-07 00:09:28 +02:00
Paul Tan
fa84121421 effects: exclude swap() from "indirect calls" assumption (#15504)
swap() will never call any procs passed to it, and so it can be safely
excluded from the "assume indirect calls are taken" effects tracking
rule.
2020-10-06 18:05:31 +02:00
IDF
9560e49e8f New hint for unused exceptions in .raises (#15492)
* New hint for unused exceptions in .raises

* Fix effects test

* Further adapt teffects1.nim
2020-10-06 16:49:30 +02:00
Andreas Rumpf
92163fa330 implements https://github.com/nim-lang/RFCs/issues/258 (#15503)
* implements https://github.com/nim-lang/RFCs/issues/258

* don't be too strict with custom pragma blocks

* cast pragmas: documentation

* added most missing inference query procs to effecttraits.nim
2020-10-06 16:47:15 +02:00
Andreas Rumpf
4e438f9096 const view types; fixes some cases from https://github.com/nim-lang/Nim/issues/15428 (#15488) 2020-10-05 18:31:46 +02:00
flywind
af9cc2882f use func in uri module (#15486) 2020-10-05 17:04:08 +02:00
Euan
cc4c546f8f Fix #15493 - disable TLS emulation for NetBSD (#15494)
TLS emulation was already disabled for FreeBSD due to the same issue.
2020-10-05 12:00:06 +02:00
alaviss
fc973b2c0c renderer: use the biggest integer type for masking literals (#15482)
On 32-bit system the mask would have a size of 32-bit, which is smaller
than the BiggestInt (usually 64-bit) it was masked against.

For some reason this only affect 32-bit Windows but not 32-bit Linux.
Might just be a difference in how gcc handle out of bound shifts for
Windows and Linux.
2020-10-04 00:39:56 +02:00
Andreas Rumpf
1f4b9cebd4 Added std/effecttraits.nim (#15462) 2020-10-02 17:22:31 +02:00
Andreas Rumpf
aa1d7fe1e9 closureiters: fixes #15243 (#15454) [backport:1.2]
* fixes #15243 [backport:1.2]
2020-10-02 12:38:16 +02:00