hlaaftana
527e792827
make var string return var char w/ BackwardsIndex ( #15461 )
...
* make var string return var char w/ BackwardsIndex
fixes #14497
* work around VM bug
* properly workaround again
2020-11-12 11:44:21 +01:00
flywind
402df0b061
fix #15916 ( #15917 ) [backport]
...
* fix #15916
* add testcase for #15916
* add comments
2020-11-12 09:31:35 +01:00
Fanael Linithien
7d4f70280e
Fix #15909 ( #15914 )
2020-11-12 09:28:32 +01:00
Timothee Cour
e5db5316c2
doAssertRaises improvements; nimscript supports except Exception as e ( #15765 )
...
* doAssertRaises now correctly handles foreign exceptions; now shows which exception is raised on mismatch
* nimscript now handles `Exception as e`
* remove catch-all doAssertRaises overload from this PR
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2020-11-12 09:25:41 +01:00
flywind
1f9bf43100
fix #14157 ( #15877 )
...
* fix #14157
* Update compiler/jsgen.nim
* add changelog
* Update compiler/jsgen.nim
* Update tests/js/tmodify_cstring.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2020-11-12 09:20:10 +01:00
Bung
826e62953f
fix #12726 Cannot take the compile-time sizeof Atomic types ( #15928 )
...
* fix #12726 Cannot take the compile-time sizeof Atomic types
* fix for arch 32
2020-11-12 09:16:40 +01:00
Bung
a81434a890
Fix 14127 js from int to int casting ( #15918 )
...
* fix #14127 from int to int casting
* add test for #14127
* use template for test, also test uint2int
* move to tests/types/t14127_cast_number.nim targets:c cpp js
2020-11-11 17:41:49 +00:00
flywind
35f8803250
close #4318(add testcase for #4318 ) ( #15904 )
...
* close #4318(add testcase for #4318 )
* Update tests/objects/t4318.nim
Co-authored-by: Juan Carlos <juancarlospaco@gmail.com >
Co-authored-by: Juan Carlos <juancarlospaco@gmail.com >
2020-11-11 10:29:17 +08:00
Miran
bbe49a14ae
Correct all eggs ( #15906 )
...
* "eg" is a misspelled "egg", "e.g." is "exempli gratia"
* Also, "ie" is "i.e.".
2020-11-10 21:53:25 +01:00
Miran
ee78d76108
rst: add support for markdown tables ( #15854 )
...
* rst: add support for markdown tables
* change template into proc
* don't create unnecessary `seq[string]`
2020-11-10 09:41:26 +01:00
flywind
d8e7caf5dd
follow #15874(add testcase for #15874 ) ( #15893 )
2020-11-10 09:23:58 +08:00
cooldome
338602a402
fix #15825 ( #15894 )
...
* fix #15825
* better fix
2020-11-09 19:24:32 +01:00
cooldome
69fe707025
Fix 15629 ( #15888 )
...
* fix #15858
* fix space
* fix #15629
* Revert "fix space"
* Revert "fix #15858 "
2020-11-09 12:26:12 +01:00
cooldome
d5a0a5dfff
Fix #15858 ( #15887 )
...
* fix #15858
* fix space
* fix #15629
* Revert "fix #15629 "
2020-11-09 12:21:56 +01:00
cooldome
7b19217798
fix #15707 ( #15870 )
2020-11-09 11:47:29 +01:00
flywind
673c5990c6
fix #12558 ( #15864 )
...
* fix #12558
* Update compiler/pragmas.nim
2020-11-09 11:46:25 +01:00
Ivan Bobev
d03f24147a
Add a macro returning enum items count ( #15824 )
...
Add a macro `enumLen` which is used to determine the number of items in
an enumeration type to the `typetraits.nim` module. Also, add unit tests
for it in the `ttypetraits.nim` module.
Related to nimlang/Nim#15824
2020-11-09 10:02:01 +01:00
flywind
203bddf307
close #11637(add testcase for #11637 ) ( #15879 )
...
* close #11637(add testcase for #11637 )
* Update tests/vm/t11637.nim
2020-11-08 11:02:12 +08:00
Bung
c07807bedf
Fix #15706 ( #15846 )
...
* fix #15706 Underflow not detected when using dec on distinct ranges
* fix #15846 first, jsgen even doesn't care of range in this op
2020-11-07 08:00:41 +00:00
flywind
8f7a013cc7
close #8558(add testcase for #8558 ) ( #15872 )
2020-11-07 07:59:47 +00:00
Ivan Bobev
3c85aa9e53
Make {.requiresInit.} to work for distinct types ( #15869 )
...
Make `requiresInit` pragma to work for distinct types in addition to
objects. Tagging of distinct types with `requiresInit` pragma was
already supported, but its impact wasn't applied. Now its behavior when
applied on distinct types is as follows.
Given the following distinct type definitions:
```nim
type
DistinctObject {.requiresInit, borrow: `.`.} = distinct MyObject
DistinctString {.requiresInit.} = distinct string
```
The following code blocks will fail to compile:
```nim
var foo: DistinctFoo
foo.x = "test"
doAssert foo.x == "test"
```
```nim
var s: DistinctString
s = "test"
doAssert s == "test"
```
But these ones will compile successfully:
```nim
let foo = DistinctFoo(Foo(x: "test"))
doAssert foo.x == "test"
```
```nim
let s = "test"
doAssert s == "test"
```
2020-11-06 18:56:09 +00:00
Clyybber
60c364fb22
Closes #12897 ( #15867 )
2020-11-06 23:49:51 +08:00
flywind
fb60e35a54
close #8829(add testcase for #8829 ) ( #15866 )
2020-11-06 23:39:20 +08:00
flywind
218ff27b70
fix #15851 ( #15852 )
...
* fix #15851
* {.cast(noSideEffect).}
2020-11-06 11:40:14 +01:00
cooldome
cdd459dd60
static[T] related fixes ( #15853 )
...
* close #9679
* close #7546
* close #9520
* close #6177
2020-11-06 10:25:43 +01:00
cooldome
fa5f225efc
fix #15609 ( #15856 )
...
* fix #15609
* fix test
2020-11-05 23:29:05 +01:00
cooldome
3af7818af4
Fix #12636 ( #15850 )
...
* close #11142
* fix #12636
* undo unwanted changes
* fix illegal recursion case
2020-11-05 18:55:52 +01:00
cooldome
9455a0c3e3
close #11142 ( #15847 )
2020-11-05 14:51:45 +01:00
flywind
c4cc907433
fix adding empty sequence to HTTP headers ( #15783 )
...
* fix adding empty sequence to HTTP headers
* add tests
2020-11-05 14:01:28 +01:00
flywind
8e1fa84b0d
fix #15663 ( #15839 ) [backport:1.4]
2020-11-05 14:00:49 +01:00
flywind
a8af664e8b
fix #15463 ( #15831 )
2020-11-05 14:00:08 +01:00
flywind
dfa2f011d7
close #10307(add testcase for #10307 ) ( #15840 )
2020-11-05 18:55:42 +08:00
flywind
fdd25ed19c
close #8457 ( #15844 )
2020-11-05 18:31:44 +08:00
cooldome
4c19c5dfae
fix static[Slice[T]] as argument issue ( #15842 )
2020-11-04 19:52:53 +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
7d640e0943
fix #15835 ( #15838 )
...
* fix #15835
* add tests
2020-11-04 01:24:40 -05:00
flywind
b8bcf236dd
fix #12640 ( #15829 )
2020-11-03 11:41:41 +01:00
flywind
fde17b159f
follow #15818 and close #7109 ( #15823 )
...
* follow #15818 and close #7109
* Update compiler/jsgen.nim
Co-authored-by: Juan Carlos <juancarlospaco@gmail.com >
Co-authored-by: Juan Carlos <juancarlospaco@gmail.com >
2020-11-02 18:27:39 +01:00
Miran
c243639979
ioutils are moved to fusion (#15822 )
2020-11-02 16:52:54 +01:00
Andreas Rumpf
dfd8a83f35
fixes #15804 ( #15820 )
...
* fixes #15804
* fix the existing test
* add the testcase for #15804
Co-authored-by: narimiran <narimiran@disroot.org >
2020-11-02 14:17:09 +01:00
flywind
eb429988cd
fixes #15594 ( #15819 )
2020-11-02 14:16:33 +01:00
Regis Caillaud
6fa82a5b3a
Handle BLOB column type in SQLite as binary data ( #15681 )
...
* Fixed not handling blob correctly in sqlite
* Fixed setLen commented by mistake
* Added binary example as db_sqlite doc
* Added tests for sqlite binary data
2020-11-02 13:02:55 +01:00
flywind
5b4c17b5e7
Closure iterators are not supported by VM ( #15818 )
2020-11-02 10:58:14 +01:00
flywind
544cb107c7
fix #8821 ( #15809 )
2020-11-02 10:41:44 +01:00
flywind
558115fa29
fixes #15717
2020-11-02 10:27:48 +01:00
flywind
919593395c
fix #15815 ( #15817 )
2020-11-02 10:22:26 +01:00
flywind
27eb19cc48
fix #15145 ( #15816 )
2020-11-02 08:56:51 +01:00
flywind
98cec6b692
closes #3670 [add testcase for #3670 ] ( #15808 )
...
* add testcase
* Update tests/template/twhenintemplates.nim
Co-authored-by: Clyybber <darkmine956@gmail.com >
2020-11-01 19:53:00 +01:00
flywind
80b0748d75
fix #15651 ( #15800 )
...
* fix
* minor
2020-10-31 12:06:13 +01:00
flywind
bc9a521270
[ closes #12682 ]add testcase for #12682 ( #15796 )
...
* add testcase for #12682
* fix
2020-10-31 03:03:51 +01:00