Dominik Picheta
2aa97a228a
Removes deprecated {.injectStmt.}. Fixes #18666 ( #18984 )
2021-10-13 11:09:45 +02:00
Andreas Rumpf
6f15af41a7
fixes a regression caused by overloadable enums even though they're opt-in ( #18970 )
2021-10-07 15:07:24 +02:00
quantimnot
19774a72e7
Fixed strictFuncs support for std/pegs ( #18951 )
...
* Fixed `strictFuncs` support for `std/pegs`
Enabled `std/pegs` in the `strictFuncs` import test.
Fixes #18057
Fixes #16892
See #18111
* Rebased from `devel`
* Conditionally compile `std/pegs` in `koch`
This is for supporting `csources` bootstrap.
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com >
2021-10-07 12:16:58 +02:00
Andrey Makarov
f03872d99e
rst: minor fixes ( #18960 )
2021-10-06 13:53:01 +02:00
flywind
cb30dc5170
enable tests for #2710 ( #18961 )
2021-10-06 09:42:35 +02:00
flywind
e7bac91773
rename nimEnableHashRef [backport] ( #18941 )
...
* rename nimEnableHashRef [backport]
* Apply suggestions from code review
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-10-04 21:28:13 +02:00
quantimnot
f017eadc97
Add support for strictEffects to std/pegs ( #18949 )
...
* Add support for `strictEffects` to `std/pegs`
* Fixed support of older Nim versions
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com >
2021-10-04 21:27:13 +02:00
flywind
5c4692fad4
rename nimLegacyJsonutilsHoleyEnum [backport] ( #18938 )
...
* enable nimPreviewJsonutilsHoleyEnum [backport]
* docuement nimPreviewJsonutilsHoleyEnum
2021-10-01 20:26:29 +02:00
flywind
4b764f4c7c
close #17319 ; add testcase ( #18934 )
2021-10-01 16:19:02 +08:00
flywind
677969f6ea
alternative to #18918 ( #18927 )
...
* fix #16558
* add testcase
2021-09-30 16:57:06 +02:00
Jason Beetham
f915b3aa86
Alternative to #18928 ( #18931 )
...
* fixed #18841
* Added test
2021-09-30 16:55:43 +02:00
Timothee Cour
f061971a9b
envPairs works in vm, nims ( #18615 )
...
* envPairs works in vm, nims
* fixup
2021-09-29 09:32:39 +02:00
Andreas Rumpf
576fece909
fixes 'lent T' inside object constructor [backport] ( #18911 )
...
* fixes 'lent T' inside object constructor [backport]
* progress
2021-09-27 22:23:31 +02:00
Andreas Rumpf
7e5eab571e
closes #18690 ; make view types stricter [backport] ( #18891 )
...
* closes #18690
* don't allow capturing of view types [backport]
2021-09-24 16:27:34 +02:00
Andreas Rumpf
90a2b5afd8
correct effect tracking for .borrowed procs [backport] ( #18882 )
...
* correct effect tracking for .borrowed procs [backport]
* progress
* fix error message in a test
* correctly fix it
Co-authored-by: narimiran <narimiran@disroot.org >
2021-09-23 16:47:24 +02:00
Andreas Rumpf
6163bdd279
closes #16132 [backport] ( #18880 )
...
* closes #16132 [backport]
* fixes #16132 [backport]
2021-09-22 15:07:36 +02:00
flywind
ee9795f76f
fix #18844 ( #18851 )
2021-09-20 09:50:20 +02:00
Andreas Rumpf
c56ba3f06a
fixes #18847 [backport] ( #18870 )
2021-09-20 09:09:53 +02:00
Andreas Rumpf
3241df2a13
fixes #18858 [backport] ( #18868 )
...
* fixes #18858 [backport]
* ensure async tests work with --experimental:strictEffects [backport]
* ensure async tests work with --experimental:strictEffects [backport]
2021-09-19 23:35:50 +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
f8e185fec0
Fixed borrowing dot from aliases ( #18854 )
2021-09-16 08:48:58 +02:00
flywind
cebf7cdc1e
fix #10128 ( #18852 )
2021-09-14 19:40:42 +02:00
flywind
bf1700bab1
add testcase for #7308 ( #18849 )
2021-09-14 19:39:55 +02:00
Jason Beetham
172253cb55
Dotborrow now works with generic distincts ( #18848 )
2021-09-14 19:34:52 +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
66e53bdd7b
Fixed type inference for 'set` and 'tuple' ( #18827 )
...
* improved built in typeclass inference
* Smarter logic to fit node
* Forgot the untyped check
2021-09-11 13:05:53 +02:00
flywind
c56008450a
fix CI failure(upstream changes) ( #18820 )
...
* fix upstream changes
* Update tests/js/tunittest_error2.nim
Co-authored-by: flywind <xzsflywind@gmail.com >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-09-08 11:47:14 +02:00
Jason Beetham
ee2eb5cae2
Fix subranges of distinct types ( #18816 ) [backport]
2021-09-07 17:11:08 +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
Andreas Rumpf
34a53e8049
fixes #12642 ( #18811 )
...
* fixes #12642
* update important packages; refs #18804
* fixes #18805 ; refs #18806
* fixes a regression
* Update testament/categories.nim
Co-authored-by: flywind <xzsflywind@gmail.com >
* progress
* progress
Co-authored-by: flywind <xzsflywind@gmail.com >
2021-09-06 17:43:03 +02:00
Jason Beetham
90bfd34250
'[]' can now be used for iterators ( #18814 )
2021-09-06 15:30:49 +02:00
Andreas Rumpf
73841ae194
fixes #14165 , fixes #18739 , fix the second example of #6269 ( #18812 )
2021-09-06 13:12:14 +02:00
Jason Beetham
7ae52d7791
Fix recursive generic typed defs ( #18809 )
2021-09-06 09:43:26 +02:00
Andreas Rumpf
5c85e480a6
unicode operator bugfixes ( #18802 )
2021-09-04 17:49:27 +02:00
Andreas Rumpf
e8dad482a3
fixes #16246 ( #18800 )
2021-09-04 15:57:16 +02:00
flywind
b3ad68edea
remove channels ( #18801 )
...
* remove channels
* test
2021-09-04 15:57:02 +02:00
Andreas Rumpf
cddf8ec6f6
implements https://github.com/nim-lang/RFCs/issues/407 ( #18793 )
2021-09-03 21:52:24 +02:00
Andreas Rumpf
c2b20516d3
implemented Unicode operators ( #18789 )
...
* implemented Unicode operators; refs https://github.com/nim-lang/RFCs/issues/388
* bugfix
* better test
* arguably more elegant implementation
* Update changelog.md
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-09-03 17:31:16 +02:00
Andreas Rumpf
06ff0e9624
fixes #18769 ( #18790 )
2021-09-03 15:18:55 +02:00
Andreas Rumpf
a7cae2bda2
fixes #16325 [backport:1.4] ( #18784 )
2021-09-02 17:15:11 +02:00
Andreas Rumpf
69cabaa81c
sequtils now support strict effect tracking ( #18782 )
2021-09-02 14:35:25 +02:00
Tomohiro
7c8ea490a2
Fix initrand to avoid random number sequences overlapping ( #18744 )
...
* Fix initrand to avoid random number sequences overlapping
* Minor fix
* Fix compile error on js backend
* Disable new test for js backend
* Minor fix
* tempfiles module uses random.initRand()
* Remove unused module import from lib/std/tempfiles.nim
* Initialize baseState in initRand()
* Run tests/stdlib/trandom.nim from tests/test_nimscript.nims
* baseState is initialized only with sysrand.urandom and quit if failed
* Add comments
2021-09-02 14:12:14 +02:00
Andreas Rumpf
e0ef859130
strict effects ( #18777 )
...
* fixes #17369
* megatest is green for --cpu:arm64
* docgen output includes more tags/raises
* implemented 'effectsOf'
* algorithm.nim: uses new effectsOf annotation
* closes #18376
* closes #17475
* closes #13905
* allow effectsOf: [a, b]
* added a test case
* parameters that are not ours cannot be declared as .effectsOf
* documentation
* manual: added the 'sort' example
* bootstrap with the new better options
2021-09-02 12:10:14 +02:00
flywind
72fa5833ad
fix #9778 (pairs iterator calling a helper proc with tuple return type will cut the iterator yield into half) ( #18767 )
...
* test someSymFromImportTable
* Update compiler/lookups.nim
* test nkTupleConstr
* use isConstExpr
* add tests
* add comments and todo
* use todo
2021-09-02 07:41:14 +02:00
Juan Carlos
041edaa1df
Implement RFC-413 ( #18749 )
...
* Implement RFC 413
* Implement RFC 413
* Implement RFC 413
* Implement RFC 413
* https://github.com/nim-lang/Nim/pull/18749#discussion_r696320995
* Update lib/js/dom_extensions.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
* Update lib/js/dom_extensions.nim
* https://github.com/nim-lang/Nim/pull/18749#discussion_r696913310
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-08-26 23:07:54 +02:00
Dankr4d
c70e4040bd
fixes #14511 [backport:1.4] ( #18732 )
...
* fixes #14511 [backport:1.4]
Signed-off-by: Dankr4d <dude569@freenet.de >
* Replaced fix with code from alaviss, for better readability, with small
changes.
Signed-off-by: Dankr4d <dude569@freenet.de >
* - Specified output in test.
Signed-off-by: Dankr4d <dude569@freenet.de >
* Replaced case in nnkRecCase with a simpler version, which just adds the
last son.
Signed-off-by: Dankr4d <dude569@freenet.de >
* Update tests/macros/t14511.nim
* Update tests/macros/t14511.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-08-25 17:27:00 +00:00
Timothee Cour
3aa16c1de0
fix RFC #341 : dot-like operators are now parsed with same precedence as . ( #18711 )
...
* fix RFC #341 : dot-like operators are now parsed with same precedence as `.`
* fixup
* [skip ci] address comment in changelog
* address comment
* update grammmar
* add manual entry
* fixup
* -d:nimPreviewDotLikeOps
* address comment to unblock PR: move nimPreviewDotLikeOps out of config/config.nims
2021-08-25 06:50:40 +02:00
konsumlamm
2d84f6e7c8
Fix #18718 ( #18731 )
...
Update tests
2021-08-23 00:13:39 +02:00
Juan Carlos
e65dc36ddd
Implement RFC-391 ( #18585 )
2021-08-22 12:32:55 -07:00