ringabout
1707bc4a99
fixes #20856 ; store defaults directly ( #20859 )
...
* fixes #20856 ; store defaults directly
* fixes
* fixes
* check
* fixes
2022-11-17 09:38:50 +08:00
Derek 呆
de89f6ce32
add more test for #20836 ( #20842 )
2022-11-14 13:49:11 -05:00
ringabout
7f2ff909d9
fixes object default fields bugs and add tests ( #20839 )
...
* fixes object default fields bugs and add tests
* Update compiler/semmagic.nim
* Update compiler/sem.nim
* Update compiler/sem.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-11-15 00:31:06 +08:00
ringabout
d901d3b8c5
fixes #20836 ; fixes #20833 ; fixes unsafeNew ( #20841 )
...
* fixes #20836 ; fixes `unsafeNew`
* fixes #20833
2022-11-14 15:59:37 +01:00
Andreas Rumpf
165d523edf
Revert "fixes #20699 ; generate an empty struct for void type" ( #20806 )
...
* Revert "fixes #20699 ; generate an empty struct for void type (#20790 )"
This reverts commit 8fcb9380f0 .
* better fix [backport]
2022-11-12 22:56:40 +01:00
Aditya Siram
8fcb9380f0
fixes #20699 ; generate an empty struct for void type ( #20790 )
...
* fixes #20699 ; generate an empty struct for void type
* Add docs and test case.
2022-11-09 20:15:06 +01:00
ringabout
c4e5dab419
fixes #20740 ; fixes pre-existing field visibility issues and removes efSkipFieldVisibilityCheck ( #20741 )
...
fixes #20740 pre-existing field visibility and refactoring
2022-11-03 15:46:16 +08:00
ringabout
39f925b95d
fixes #20715 ; range[a..b] inside object variant fails ( #20716 )
...
* fixes #20715 ; range[a..b] inside object variant fails
* step one fix
* better fix
* fixes private fields
* mistake
2022-10-31 18:42:45 +01:00
ringabout
141abb7b75
fixes #20681 ; add efSkipFieldVisibilityCheck to skip check ( #20639 )
...
* don't sem const objectConstr defaults
* fixes
* add `efSkipFieldVisibilityCheck`; fixes nkBracket types
* fixes #20681
* fixes tests
* suggestion from @metagn
* fixes tests
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com >
2022-10-28 16:19:40 -04:00
ringabout
27896ed469
fixes type check of ranges for default fields ( #20660 )
2022-10-27 17:23:33 +02:00
ringabout
c1343739e1
add type check for default fields ( #20652 )
2022-10-25 07:39:57 +02:00
ringabout
d954e698b3
Automatic dereferencing is removed ( #20531 )
2022-10-10 15:02:23 +02:00
ringabout
079363bfc3
remove implicit let/var default initialization ( #20508 )
2022-10-07 07:49:27 +02:00
ringabout
f89ba2c951
add default field support for object in ARC/ORC ( #20480 )
...
* fresh start
* add cpp target
* add result support
* add nimPreviewRangeDefault
* reduce
* use orc
* refactor common parts
* add tuple support
* add testcase for tuple
* cleanup; fixes nimsuggest tests
* there is something wrong with cpp
* remove
* add support for seqs
* fixes style
* addd initial distinct support
* remove links
* typo
* fixes tuple defaults
* add rangedefault
* add cpp support
* fixes one more bugs
* add more hasDefaults
* fixes ordinal types
* add testcase for #16744
* add testcase for #3608
* fixes docgen
* small fix
* recursive
* fixes
* cleanup and remove tuple support
* fixes nimsuggest
* fixes generics procs
* refactor
* increases timeout
* refactor hasDefault
* zero default; disable i386
* add tuples back
* fixes bugs
* fixes tuple
* add more tests
* fix one more bug regarding tuples
* more tests and cleanup
* remove messy distinct types which must be initialized by original types
* add tests
* fixes zero default
* fixes grammar
* fixes tests
* fixes tests
* fixes tests
* fixes comments
* fixes and add testcase
* undo default values for results
Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com >
2022-10-04 12:45:10 +02:00
Bung
0769b160c5
less test time costs ( #20479 )
2022-10-02 06:42:41 +02:00
ringabout
7739e23420
defaults to ORC ( #19972 )
...
* defaults to Orc
* bootstrap using refc
* use gc
* init orc defines
* unregister orc
* fix gc
* fix commands
* add prepareMutation for orc
* enable deepcopy for orc
* prepareMutation
* more fixes
* some cases
* bug #20081
* partial fixes
* partial fixes
* fixes command line
* more fixes
* build Nim with refc
* use gc
* more fixes
* rstore
* orc doesn't support threadpool
* more shallowCopy
* more fixes
* fixes unsafeNew
* workarounds
* small
* more fixes
* fixes some megatest
* tcodegenbugs1 refc
* fxies megatest
* build nimble with refc
* workaround tensordsl tests
* replace shallowCopy with move
* fixes action
* workaround
* add todo
* fixes important packages
* unpublic unregisterArcOrc
* fixes cpp
* enable windows
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com >
2022-09-23 13:05:05 +02:00
metagn
86f7f4ffa5
remove deprecated type pragma syntax, fix bugs that required it ( #20199 )
...
* remove deprecated pragma syntax from 0.20.0
closes #4651 , closes #16653 with a cheap fix for now due to
how early `tfFinal` is set
* remove type pragma between name and generics
* undo removal, try removing bind expression (0.8.14)
* fix test, unremove bind expr
* remove again
* Update changelog.md
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
* dependencies @ HEAD & weave test dependencies
* try fix package ci
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2022-09-03 09:52:13 +02:00
flywind
0c3892c3c7
nvro don't touch cdecl types [backport: 1.6] ( #19461 )
...
* nvro don't touch cdecl types; fix #19342 again
2022-01-28 09:53:42 +01:00
flywind
9b9ae8a487
nrvo shouldn't touch bycopy object[backport:1.2] ( #19385 )
...
fix nim-lang#19342
2022-01-14 00:39:17 +08:00
Saem Ghani
c6dc9c0255
fixes #17437 - crash where error reporting > 1 ( #17547 )
...
* fixes #17437
* Fix bug reference comment
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* [skip ci] describe why we have hasError
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-03-29 12:48:00 +02:00
flywind
271f68259b
remove some noises in tests ( #16448 )
2020-12-27 14:45:57 +01:00
Timothee Cour
7e1ae35195
testament: error instead of silently ignore invalid targets; remove pointless alias target vs targets; document matrix; DRY ( #16343 )
...
* testament: error instead of silently ignore invalid targets
* s/target/targets/
* fix test; refs #16344
* address comments
* Update testament/specs.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2020-12-14 10:58:29 +01: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
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
Timothee Cour
377f716766
fix #14698 nkRecWhen caused internalAssert in semConstructFields when generic type not mentioned in fields ( #14709 )
...
* fix #14698 nkRecWhen caused internalAssert in semConstructFields when generic type not mentioned in fields
* address comment
* Update compiler/semtypinst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2020-07-27 22:32:21 +02:00
Jacek Sieka
7d6cbf290a
Error -> Defect for defects ( #13908 )
...
* Error -> Defect for defects
The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.
With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
2020-04-28 19:56:01 +02:00
cooldome
13fa338ada
implement ( #14114 )
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-04-25 19:59:56 +02:00
Zahary Karadjov
be95f8fdfa
Turn some of the errors back into warnings
2020-04-01 19:38:44 +02:00
Jasper Jenkins
51bd442b88
fix when statements in inheritable generic objects ( #13667 ) [backport]
2020-03-17 23:44:32 +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
Neelesh Chandola
1db21721ec
Fixed objects being erroneously zeroed out before object construction ( #12814 ) [backport]
2019-12-05 17:31:51 +01:00
Federico Ceratto
39290cf88c
Fix spellings ( #12277 ) [backport]
2019-09-27 07:02:54 +02:00
Clyybber
f9600b7207
Remove ENDB ( #12095 )
2019-08-31 07:44:53 +02:00
Arne Döring
5b27b263fd
Remove immediate pragma ( #11308 )
...
* remove immediate from tests
* remove immediate from the compiler
2019-05-29 22:21:51 +02:00
narimiran
588610b395
add tests, closes #3012 , closes #7244
2019-02-27 12:39:35 +01:00
Araq
f31d1fa98b
fixes #10195
2019-02-19 16:25:57 +01:00
Arne Döring
28394153ab
32 bit fixes ( #10608 )
2019-02-13 23:30:14 +01:00
Araq
8947779dd0
disable one more test for C++
2019-01-16 21:19:51 +01:00
Andreas Rumpf
05c52ff34f
fixes #10203 ( #10290 )
...
* fixes #10203
* make typredef test green again
* fixes the regressions differently
2019-01-15 10:15:27 +01:00
Neelesh Chandola
d998cb58dd
void object fields are now ignored by codegen and fields/fieldPairs iterator ( #10144 )
...
* Codegen now ignores object fields of type void
* Fix `$` bug for objects/tuples where it does not add a comma
* fields/fieldPairs iterators now ignore void types
* Use `isEmptyType` instead of checking for `tyVoid` directly
2019-01-10 12:49:35 +01:00
Andreas Rumpf
e4ae7a8929
Merge pull request #8748 from LemonBoy/when-in-objects
...
Pervasive replacement of nkRecWhen in generic types
2018-12-12 18:19:52 +01:00
Arne Döring
3859878db8
megatest checks output and nimout
2018-12-11 21:23:22 +01:00
Arne Döring
1105d03644
require errormsg to be specified before file.
2018-12-11 21:23:21 +01:00
Araq
e07188b79e
threw away a silly test
2018-11-23 11:58:33 +01:00
Arne Döring
9c2365d5c2
activated more tests, allow input in test spec
2018-11-23 11:58:28 +01:00
Arne Döring
031bfdec6f
make run the default action of a test in tester
2018-11-23 11:58:28 +01:00
Miran
1b17c9f693
More descriptive names of test files ( #9531 )
...
* change generic `tissues` name to more specific
* change `tvarious` to more specific names
2018-10-29 17:07:27 +01:00
LemonBoy
5afcd09cb3
Pervasive replacement of nkRecWhen in generic types
...
Long story short, even if the type contains no reference at all to its
generic parameters we still have to walk its AST and evaluate any
nkRecWhen nodes that semRecordNodeAux skipped due to the type being a
generic one.
We also must be careful to modify the type `n` node in place since it
may be referenced by the caller as seen in the tillegaltyperecursion
test.
Moreover we also can't have the nkSym drift away from their original
values in order not to break the JS nkObjConstr codegen.
2018-10-19 22:17:38 +02:00
Miran
749dbce4c6
Merge tests into a larger file (part 5 of ∞) ( #9368 )
...
* merge magics
* merge metatype tests
* merge method tests
* merge objects tests
* change `import future` to `import sugar`
Nim in Action tests are left with `import future`, to ensure compatibility.
* merge overload tests
* merge proc tests
* merge procvar tests
* merge range tests
* merge seq tests
* merge sets tests
* remove wrong assert from `tsets3`
* fix `jsTests`
* better fix
2018-10-16 10:50:10 +02:00