flywind
9df195ef58
style usages part one (openarray => openArray) ( #19321 )
...
* style usages (openArray)
* revert doc changes
2022-01-04 13:29:50 +01:00
Jason Beetham
f915b3aa86
Alternative to #18928 ( #18931 )
...
* fixed #18841
* Added test
2021-09-30 16:55:43 +02:00
alaviss
6cd219c3a3
semtypinst: don't wrap type nodes from expressions in static[T] ( #18860 )
2021-09-17 06:51:26 +02:00
Jason Beetham
3f3e0fa303
Fixed #18838 ( #18841 ) [backport]
2021-09-13 09:35:19 +02:00
Jason Beetham
5d1608c976
Generic pointer procs now error if no types supplied ( #18832 )
...
* more precise logic for pointer procs
* added test for generic pointer procs
* Fixed generic getting bracket expr if erroring
2021-09-11 22:20:22 +02:00
Jason Beetham
30d28bcefc
Fixes implicit and explicit generics in procedures ( #18808 )
...
* Fixes implicit and explicit generics
* moved block logic into 'maybeInstantiateGeneric'
* Added more tests
* Update compiler/semexprs.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-09-06 20:11:21 +02:00
Jason Beetham
7ae52d7791
Fix recursive generic typed defs ( #18809 )
2021-09-06 09:43:26 +02:00
Timothee Cour
24445d31b3
improve several tests in testament ( #18635 )
...
* silence error output from template_various.nim
* any => auto in tests
* avoid showing failed for parseSpec since this is expected behavior in 2 cases: tincludefile.nim, tnav1.nim
* enforce InheritFromException
* fixup
2021-08-08 19:28:49 +02:00
Timothee Cour
78e2d299df
typo: nonexistant => nonexistent ( #17918 )
...
* typo: nonexistant => nonexistent
* fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910 )
2021-05-02 00:26:41 +02:00
Saem Ghani
72b89eff82
semLambda removed, semProcAux reworked ( #17379 )
...
* simplified proc-like name ident to symbol code
* wip - reworking generic param sem
* wip - closer to removing nkEmpty generic params
* it's hacky but tests pass
* slowly tweaking semProcAux to take on semLambda
* fix pragma superset check proto vs current
* Set the symbol owner earlier
* partial progress reworking proto
found bug where default values between forward and impl lead to overload
resolution issues.
* simplified pragma handling and callConv checks
Co-authored-by: Clyybber <Clyybber@users.noreply.github.com >
* partially working
* cgexprs issue
* It works!
* comment clean-up
* clean-up asserts, comments, and other bits
* add isGenericParams, inline isGeneric queries
* seeing if this is sufficiently consistent
* can use this approach or continue it in a further PR
* commentary about nullary generics and clean-ups
* fixed a mistake in PNode isGenericRoutine
* Some small cleanups
* Small cleanup
* for func lambdas ensure we use lambda pragmas
* add some basic compileTime func tests
* [ci skip] remove comments
Co-authored-by: Clyybber <Clyybber@users.noreply.github.com >
Co-authored-by: Clyybber <darkmine956@gmail.com >
2021-03-17 19:51:50 +01:00
Timothee Cour
578d1ee751
std/options: $some(3) is now "some(3)", etc. (#17147 )
...
* std/options: $some(3) is now "some(3)", not "Some(3)", `$none(int)` is now `"none(int)"` instead of `"None[int]"`
* fix tests
* disable optionsutils
2021-02-24 22:17:16 +00:00
Juan Carlos
78a99587a4
Deprecate TaintedString ( #15423 )
...
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com >
2021-01-15 18:56:38 -08:00
flywind
6d442a40a6
use doAssert in tests ( #16486 )
2020-12-28 14:13:21 +01:00
Timothee Cour
6114df3c24
testament: error instead of silently overwrite a spec ( #16166 )
2020-11-29 10:42:50 -08:00
Timothee Cour
b809562c7c
make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec ( #16151 )
...
* fix megatest newlines
* still allow missing trailing newline for now but in a more strict way than before
2020-11-28 09:09:31 +01:00
c-blake
f17555770e
Clarify the sense in which Nim supports recursive iterators in the ( #15834 )
...
manual, the tutorial, and the `tbintree` test.
2020-11-04 16:56:22 +01:00
flywind
40a868bccc
add testcase for #6060 ( #15366 )
...
* add testcase for #6060
* Remove overspecific testament spec
Co-authored-by: Clyybber <darkmine956@gmail.com >
2020-09-21 13:37:14 +02:00
Andreas Rumpf
c5358b0d4b
An optimizer for ARC ( #14962 )
...
* WIP: an optimizer for ARC
* do not optimize away destructors in 'finally' if unstructured control flow is involved
* optimized the optimizer
* minor code cleanup
* first steps to .cursor inference
* cursor inference: big steps to a working solution
* baby steps
* better .cursor inference
* new feature: expandArc for easy inspection of the AST after ARC transformations
* added topt_cursor test
* adapt tests
* cleanups, make tests green
* optimize common traversal patterns
* moved test case
* fixes .cursor inference so that npeg compiles once again
* cursor inference: more bugfixes
Co-authored-by: Clyybber <darkmine956@gmail.com >
2020-07-15 23:00:06 +02:00
Clyybber
e057b1d839
Fix #14990 ( #14991 )
...
* Fix #14990
* Add testcase
2020-07-15 19:00:52 +02:00
Clyybber
f2b041f168
Reenable a few tests
2020-07-14 19:50:42 +02:00
Clyybber
ddfb7d9877
Closes #10396
2020-07-14 19:50:42 +02:00
Clyybber
03b0374e5c
Closes #8426
2020-07-14 19:50:42 +02:00
jcosborn
ffaf4797be
add full tests from #9463 ( #14975 )
2020-07-14 11:24:17 +02:00
flywind
21772b6419
add testcase for #5926 ( #14965 )
2020-07-11 17:09:41 +02:00
flywind
64815f59b2
add testcase for #4668 ( #14946 )
...
closes #4668
closes #9463
2020-07-09 12:53:12 +02:00
Danil Yarantsev
0327159344
Add test-cases to some fixed issues to close them ( #14795 )
2020-06-24 20:38:08 -07:00
Kaushal Modi
bf0e1c696f
Remove the uses of {.procvar.} pragma ( #14359 )
...
This pragma did nothing.
Ref:
- https://github.com/nim-lang/Nim/issues/2172#issuecomment-383276469
- https://github.com/nim-lang/Nim/issues/12975
2020-05-15 23:37:24 +02:00
Clyybber
eca8f1d79f
Add tests for #8481 , #6490 and #4061 ( #14083 )
2020-04-23 19:52:33 +02:00
Miran
8088633250
faster CIs ( #13803 )
...
* ttables: smaller table, 5x speedup
* thavlak: less iterations, less loops; 30% speedup
* tasyncclosestall: shorter timeout; 35% speedup
* gcleak4: less iterations, 2x speedup
* ttimes: remove deprecated stuff
* tdangerisrelease: remove cpp backend, 3x speedup
* tfrexp1: smaller range, 2x speedup
* trtree: fix warnings, less iterations, 6x speedup
* tasyncawait_cyclebreaker: smaller swarm size; 2x speedup
* trealloc: smaller number of iterations; 10x speedup
* towned_binary_tree: less iterations, 4x speedup
* tclosure: remove unused code, less iterations; 2x speedup
* twaitany: less durations; 1.4x speedup
* tasync_misc: less iterations, 2x speedup
* t8535: smaller sleep, 1.5x speedup
* tmanyjoin: smaller sleep, 2x speedup
* t12221: shorter sleeps, removed two slower tests; 1.6x speedup
* tfuturestream: smaller sleep; 1.5x speedup
* growobjcrash: less iterations; 2x speedup
* ttryrecv: smaller sleep; 1.5x speedup
* treusetvar: less threads; 2x speedup
* delete tthreadanalysis2, basically a duplicate of tthreadanalysis
* t7758: less iterations, 1.5x speedup
* tasyncawait: smaller swarm, less messages; 1.5x speedup
* tjsandnativeasync: smaller sleep, 1.5x speedup
* tpendingcheck: smaller sleep, 1.5x speedup
* remove rodfiles test category
* move tseq from its own category to 'collections' category
* remove unneeded tests and helpers from 'assert' category
* stdlib: merge tbitops2 into tbitops
* remove 'trepr2' from 'stdlib' cat
* merge 'tstreams' into one file
* remove 'tinefficient_const_table' from 'ccbugs' cat
* merge 'tcollections_to_string' into 'tcollections'
* tblocking_channel: smaller sleep, small speedup
* tconvexhull: less iterartions; 1.2x speedup
* merge 'tdeepcopy2' into 'tdeepcopy'
* merge 'tdisjoint_slice2' into 'tdisjoint_slice1'
* tmissing_deepcopy: smaller sequence
* tsendtwice: smaller arrays; 5x speedup
* remove 'tindexerrorformatbounds'
* disable multimethod tests
* remove 'gc:none' and 'refc' without 'd:useRealtimeGC' from gc tests
* koch.nim: bootstrap just with '-d:release', no need for 'csource'
* add github workflow for documentation
* testament: no need for 8 sub-second decimals
2020-03-30 13:18:12 +02:00
Miran
5b55aa52d0
fix deprecations and other warnings ( #13748 )
2020-03-25 19:15:34 +01:00
Timothee Cour
ed263e174e
fix #13524 astToStr now works inside generics ( #13681 )
2020-03-18 13:43:32 +01:00
Araq
861a5340fe
fixes #13519
2020-03-11 09:26:57 +01:00
Andreas Rumpf
c446c0f57a
fixes #13378 [backport] ( #13392 )
2020-02-11 23:48:41 +01:00
Timothee Cour
e4415422fe
Revert "printing float values will have one more digit. ( #13276 ) [backport]" ( #13363 )
...
This reverts commit b2c6db97f9 .
2020-02-08 09:30:24 +01:00
Arne Döring
b2c6db97f9
printing float values will have one more digit. ( #13276 ) [backport]
...
* printing float values will have one more digit. Fixes #13196
2020-02-07 17:10:25 +01:00
Andreas Rumpf
41555ca86f
fixes #13110 ( #13197 )
2020-01-19 23:30:45 +01:00
Andreas Rumpf
e58c2d261c
[backport] fix #12528 , fix #12525 : incorrect generic type resolution for default values ( #12538 )
2019-10-28 16:56:38 +01:00
Arne Döring
21cbfd72ec
Refactor json macro ( #12391 )
...
* closes #12316
* make tjsonmacro work at js target
* closes #12289
* closes #11988
* also fixed gdb related stuff
2019-10-17 09:55:41 +02:00
Jasper Jenkins
245a954b25
ungeneric unsigned ops ( #12230 )
...
* ungenericise unsigned ops, remove nimNewShiftOps
* fix/remove tests
* update t6448
* fix line info
* disable on 32bit
* fix different line info
* add changelog entry
2019-10-11 08:38:08 +02:00
Araq
57bc8d73b4
fixes subtype relation regression
2019-05-22 07:41:16 +02:00
Araq
90e882d55b
fixes #11239
2019-05-22 07:41:16 +02:00
Andreas Rumpf
95f8ed0382
fixes #6732 ( #11255 )
2019-05-15 08:18:20 +02:00
Andreas Rumpf
9ecb24e443
fixes #88 ( #11243 )
2019-05-15 08:17:29 +02:00
Arne Döring
28394153ab
32 bit fixes ( #10608 )
2019-02-13 23:30:14 +01:00
LemonBoy
0ebef1764d
Propagate tfGcSafe flag to generic instantiations ( #10620 )
...
Fixes a nasty endless loop in the generic instantiation phase.
2019-02-13 23:30:14 +01:00
Ray Imber
94f6a6b294
Fix for issue #10342 . better message for generic subclass instantiation ( #10354 )
...
* Fix for issue #10342 . better message for generic subclass instantiation errors.
2019-01-22 17:05:26 -08:00
Timothee Cour
6ce3949c8a
add isNamedTuple; make $(1, 2) be (1, 2) instead of (Field0: 1, Field1: 2) which leaked implementation detail ( #10070 )
...
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of leaking implementation detail (Field0: 1, Field1: 2)
fixes this: #8670 (comment) /cc @alehander42 @Vindaar @mratsim
* Note: isNamedTuple is useful in other places, eg #10010 (comment)
* move isNamedTuple to helpers.nim to avoid exposing new symbol to system.nim
* remove workaround in tests/vm/tissues.nim failing test now that #10218 was makes it work
2019-01-08 18:37:25 -08:00
Araq
34815a4697
megatest: make it green on Linux
2018-12-11 21:23:25 +01:00
Araq
916955dc95
make more tests green
2018-12-11 21:23:25 +01:00
Andreas Rumpf
ac785b0623
testament: joinable is now an explicit concept of a test spec
2018-12-11 21:23:24 +01:00