ringabout
9c40dd2406
fixes #21840 ; nested local template lookup regression ( #21841 )
...
* fixes #21840 ; nested local template lookup regression
* use original types
* fixes js vm tests
2023-05-12 19:38:10 +08:00
metagn
161f50643a
make deprecated statement a no-op ( #21836 )
2023-05-12 10:05:38 +02:00
Matt Wilson
ea39c600ab
Add minmax to comparisons ( #21820 )
...
* Add `minmax` to sequtils
This adds a `minmax` proc to complement `min` and `max`; it computes
both results in a single pass for efficiency.
* Update lib/pure/collections/sequtils.nim
* Add minmax note to changelog.
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2023-05-12 14:02:09 +08:00
ringabout
ebbad9e960
cursor fields cannot form reference cycles ( #21832 )
...
* cursor fields cannot form a reference cycle
* fixes typo
* fixes position
2023-05-11 20:49:47 +02:00
ringabout
3b9999b93c
adds documentation for =wasMoved and =dup hooks and small fixes ( #21827 )
...
* adds documentation for `=wasMoved` and `=dup` hooks and small fixes
* Update doc/destructors.md
* Update doc/destructors.md
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2023-05-11 19:38:27 +08:00
ringabout
71dc929ad7
bring #21802 back; fixes #21753 [backport] ( #21815 )
...
* bring #21802 back; fixes #21753 [backport]
* adds tests and multiple fixes
* add test cases
* refactor and remove startId
* fixes custom hooks and adds tests
* handle tyUncheckedArray better
2023-05-11 10:29:11 +02:00
metagn
02be212dae
clean up SOME pending/xxx/issue link comments ( #21826 )
...
* clean up SOME pending/xxx/issue link comments
* great
2023-05-11 10:23:52 +02:00
Andreas Rumpf
f3a4cc584e
make ORC threadlocal, take two ( #21818 )
...
* ORC: make rootsThreshold thread local [backport]
* fixes the regression
2023-05-10 12:54:43 +02:00
ringabout
deaf684375
fix #9423 followup #17594 : distinct generics now work in VM ( #21816 )
...
* fix #9423 distinct generics now work in vm
* fixes cpp tests
---------
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2023-05-10 11:06:14 +02:00
metagn
5491e0c274
re-enable badssl test ( #21775 )
...
test reenable badssl
2023-05-09 21:37:32 +08:00
ringabout
ebdff1c7d3
fixes #21801 ; object field initialization with overloaded functions ( #21805 )
...
* fixes #21801 ; object field initialization with overloaded functions
* use the correct type
2023-05-08 13:52:28 +02:00
ringabout
4a94f3606e
revert #21799 and #21802 which don't pass the tests ( #21804 )
...
* Revert "ORC: make rootsThreshold thread local [backport] (#21799 )"
This reverts commit b74d49c037 .
* Revert "fixes #21752 [backport] (#21802 )"
This reverts commit d0c62fa169 .
2023-05-07 09:22:42 +02:00
ringabout
8cf5643621
fixes #21280 ; Enum with int64.high() value crashes compiler ( #21285 )
...
* fixes #21280 ; Enum with int64.high() value crashes compiler
* Update tests/enum/tenum.nim
* Update tests/enum/tenum.nim
* fixes tests
* Update tests/enum/tenum.nim
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2023-05-06 21:38:17 +02:00
ringabout
b562e1e6d8
implement =dup hook eliminating wasMoved and =copy pairs ( #21586 )
...
* import `=dup` hook eliminating `wasMoved` and `=copy` pairs
* add dup
* add a test for dup
* fixes documentation
* fixes signature
* resolve comments
* fixes tests
* fixes tests
* clean up
2023-05-06 21:36:57 +02:00
quantimnot
365a753eed
Fix some styleCheck bugs ( #20095 )
...
refs #19822
Fixes these bugs:
* Style check violations in generics defined in foreign packages are raised.
* Builtin pragma usage style check violations in foreign packages are raised.
* User pragma definition style check violations are not raised.
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com >
2023-05-06 19:10:13 +02:00
ringabout
53c15f24e9
fixes #21704 ; remove nfIsRef for genLit in VM ( #21765 )
...
* fixes #21704 ; remove `nfIsRef` for genLit
* remove nfIsRef from the output of macros
* make the logic better
* try again
* act together
* excl nfIsRef
2023-05-06 18:04:08 +02:00
Andreas Rumpf
b74d49c037
ORC: make rootsThreshold thread local [backport] ( #21799 )
2023-05-06 17:58:00 +02:00
ringabout
07233ceca0
fixes #21792 ; enable checks for sum, prod, cumsummed and cumsum ( #21793 )
...
* enable checks for sum, prod, cumsummed and cumsum
* fixes #21792
* add test cases
2023-05-05 14:23:38 +02:00
metagn
e92d7681bb
consistent use of scForceOpen for generic dot field symbols ( #21738 )
...
* always force open generic dot field symbols?
fixes #21724 but might break code
* alternative, should fix CI
* other alternative, add test for previous CI failure
* not needed
* make sure call doesn't compile too
* ok actual second test
* ok final actual correct test
* apply performance idea
* don't make fromDotExpr static
2023-05-05 07:28:06 +02:00
metagn
44736d26cd
error on user pragma args ( #21776 )
...
closes #20978
2023-05-03 14:18:55 +02:00
ringabout
a154950570
closes #10108 ; add a test case ( #21770 )
2023-05-03 06:42:32 +02:00
metagn
e5d0907a42
line info for strformat + fix issue with typed templates ( #21761 )
...
* line info in strformat
* also fix #20381
2023-05-02 11:28:52 +02:00
metagn
c2bcfd8cd9
cheap fix for #10853 + better tuple subscript error message ( #21767 )
...
* cheap fix for #10853
* also better tuple subscript error message
* weird
2023-05-02 11:13:38 +02:00
ringabout
afc30ca879
fixes #19863 ; move sha1, md5 to nimble packages for 2.0 ( #21702 )
...
* move sha1, md5 to nimble packages
* boot the compiler
* fixes tests
* build the documentation
* fixes docs
* lol, I forgot koch.nim
* add `nimHasChecksums` define
* clone checksums but maybe copying is better
* bump nimble hash
* use ChecksumsStableCommit
* fixes tests
* deprecate them
* fixes paths
* fixes koch
2023-05-02 10:49:17 +02:00
ringabout
560fa9a1fe
handle quoted routine symbols and non symbols expressions as before ( #21740 )
2023-04-28 10:25:31 +02:00
metagn
0032322ea8
fix #21727 ( #21729 )
2023-04-26 08:02:44 +02:00
Andreas Rumpf
20b011de19
refactoring in preparation for better, simpler name mangling that wor… ( #21667 )
...
* refactoring in preparation for better, simpler name mangling that works with IC flawlessly
* use new disamb field
* see if this makes tests green
* make tests green again
2023-04-24 06:52:37 +02:00
metagn
380dafcc32
fix iterator equality + add test for proc equality + fix sameType ( #21707 )
...
* fix iterator equality + add test also for procs
fixes #21706
* all targets
* and isNil and repr
* separate overloads, fix sameType
* more restricted sameType?
* merge overloads again??
* remove sametype change for now
* fix sameType anyway (CI failure was not related)
---------
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com >
2023-04-23 17:43:59 +08:00
metagn
6ad246b215
temporarily disable badssl tests ( #21710 )
...
* temporarily disable badssl tests
refs #21709
* fix
2023-04-23 07:09:25 +02:00
metagn
63d29ddd69
alias syntax fixes, improvements and tests ( #21671 )
...
* alias syntax fixes, improvements and tests
* even better, cannot use alias syntax with generics
* more type tests, improve comment
* fix again
* consistent error message + make t5167_5 work
* more comments, remove {.noalias.}
2023-04-22 09:11:56 +02:00
Juan M Gómez
c136ebf1ed
implements #21620 : allowing to import multiple modules with shared names ( #21628 )
2023-04-21 15:40:13 +02:00
ringabout
4fa86422c0
stdlib tests now check refc too ( #21664 )
...
* stdlib tests now check refc too
* typo
* fixes line numbers
* disable cpp
* do not touch
2023-04-21 15:37:58 +02:00
ringabout
b54b03d04f
tweak spellsuggest; three counts for equal distances candidates by default ( #21700 )
...
* tweak spellsuggest; three counts for equal distances candidates
* only suggest typos when length > 3
2023-04-21 15:36:18 +02:00
Bung
d76458a6cd
add test for #13764 ( #21699 )
2023-04-21 18:05:50 +08:00
ringabout
9cb06d357e
fixes #21540 ; deref block at transf phase to make injectdestructors function properly ( #21688 )
...
* fixes #21540 ; deref block at transf phase to make injectdestructors function properly
* add a test case
* add one more test
* fixes the type of block
* transform block
2023-04-19 11:55:54 +02:00
Andrey Makarov
24b6378382
Fix RST/Markdown false heading detection ( #21685 )
2023-04-18 10:37:47 +02:00
metagn
2f547afb0f
import brackets support as and prefixes [backport] ( #21636 )
...
* import brackets support `as` and prefixes
fixes #21635
* copyTree -> copyNode
2023-04-18 10:35:35 +02:00
metagn
9dc1f2dd0f
actually fix #19015 ( #21680 )
...
* actually fix #19015
* more tests
* round out
2023-04-17 20:56:52 +02:00
metagn
202b190473
revert #21227 ( #21681 )
...
* revert #21227 but keep test
* add test for #21677
* don't export
* delete test
2023-04-17 20:56:11 +02:00
metagn
b0a98cc01e
warn on set types bigger than max size, default to 0..255 for int literals ( #21659 )
...
* test implicitly huge set types
refs https://github.com/nim-lang/RFCs/issues/298
* oh my god
* boot at least
* don't error, fix remaining issues, no 2 len arrays
* fix runnable example
* test assuming 0..255 for int literal
* test refactor, add changelog, test
2023-04-17 20:55:22 +02:00
ringabout
65223e6f59
fixes #21674 ; lent can be used in the fields or the cast type as a parameter ( #21684 )
...
* fixes #21674 ; `lent` can be used in the fields or the cast type as a parameter
* add a test case
* fix the test
2023-04-18 00:31:47 +08:00
ringabout
91e4381a20
fixes #20155 ; repr range with distinct types is broken in ORC ( #21682 )
...
fixes #20155 ; repr range with distinct types is broken with ORC
2023-04-17 17:08:53 +02:00
ringabout
512517c223
fixes #18146 ; fixes #19372 ; disable tlsEmulation on windows; static link pthreads with mingw ( #21668 )
...
* fixes #18146 ; disable tlsEmulation on windows; static link libwinthreads DLL
* whatever
2023-04-14 22:52:35 +02:00
metagn
1a99bcd6ab
runnableExamples imports std/assertions by default ( #21658 )
...
closes https://github.com/nim-lang/RFCs/issues/499
2023-04-14 12:39:23 +02:00
metagn
c694d8e4fd
custom pragmas: correct error condition, remove outdated symkind whitelist ( #21653 )
...
* test not restricting custom pragma applied symbols
fixes #21652
* fix other test
* different patch
* fix tests
* actually test #18212 and other routines
2023-04-13 12:50:43 +02:00
ringabout
16f42084d3
fixes #20900 ; Calling template through from generic function across module fails to build ( #21649 )
...
* fixes #20900 ; Calling template through from generic function across module fails to build
* sanother way
2023-04-13 12:11:06 +02:00
metagn
3f51b6f73d
set module symbol type to None instead of nil for discard check ( #21657 )
...
* set module symbol type to None instead of nil
fixes #19225
* alright
2023-04-13 11:56:16 +02:00
ringabout
1ed54b7718
fixes #21632 ; enforce deref for wasMoved in ORC ( #21647 )
...
fixes #21632 ; enforce deref for `wasMoved`
2023-04-12 10:45:45 +02:00
metagn
f05387045d
int64/uint64 as bigint in JS ( #21613 )
...
* int64/uint64 as bigint in JS
* fix CI
* convert to compile option
* fix lie
* smaller diff, changelog entry
2023-04-11 21:20:20 +02:00
metagn
be06446ffe
fix #15691 ( #21623 )
...
`semProcAux` has a check for `checkMinSonsLen(n, bodyPos + 1)`
2023-04-11 09:37:53 +02:00