summary refs log tree commit diff stats
path: root/tests/objects
Commit message (Collapse)AuthorAgeFilesLines
* fixes #22926; Different type inferred when setting a default value for an ↵ringabout2023-11-292-6/+30
| | | | | array field (#22999) fixes #22926
* fixes #22613; Default value does not work with object's discriminator (#22614)ringabout2023-09-011-1/+16
| | | | | | | | | | | | | | | * fixes #22613; Default value does not work with object's discriminator fixes #22613 * merge branches * add a test case * fixes status * remove outdated comments * move collectBranchFields into the global scope
* When in object handles procedure call again, fixes #22474 (#22480)Jason Beetham2023-08-151-0/+32
| | | Ping @narimiran please backport to the 2.0 line.
* fixes #22301; fixes #22324; rejects branch initialization with a runtime ↵ringabout2023-07-251-0/+17
| | | | | | | | | | | discriminator with defaults (#22303) * fixes #22301; rejects branch initialization with a runtime discriminator with defaults * undefault nimPreviewRangeDefault * fixes tests * use oldCheckDefault
* fixes #22123; Compiler bug with default initializer values and arrays (#22128)ringabout2023-06-201-0/+14
|
* fixes ilegal recursion (#22105)Juan M Gómez2023-06-162-0/+12
|
* Allows for arbitrary ordering of inheritance in type section #6259 (#22070)Juan M Gómez2023-06-151-1/+1
| | | | | | | | | | | | | * Allows for arbitrary ordering of inheritance in type section #6259 * prevents ilegal recursion * fixes ilegal recursion. Test passes with a better message * Apply suggestions from code review --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #21840; nested local template lookup regression (#21841)ringabout2023-05-121-0/+74
| | | | | | | * fixes #21840; nested local template lookup regression * use original types * fixes js vm tests
* fixes #21801; object field initialization with overloaded functions (#21805)ringabout2023-05-081-0/+23
| | | | | * fixes #21801; object field initialization with overloaded functions * use the correct type
* fix #20972 fixes invalid and UB codegen case object transitions for both ↵ringabout2023-04-041-0/+15
| | | | | refc and ORC [backport] (#21611) fix #20972 fixes invalid and UB codegen case object transitions for refc and ORC
* fixes #21023; Segfault when mixing seqs, orc, variants and futures (#21497)ringabout2023-03-101-0/+32
| | | | | | | | | * fixes #21023; Segfault when mixing seqs, orc, variants and futures * fixes none of the branches were explicitly selected * add one more test * one more test
* fixes #20695; fixes object with distinct defaults and tables (#21428)ringabout2023-02-241-1/+38
|
* unpublic `arrayWith` and rename it to `nimArrayWith` (#21006)ringabout2022-12-041-1/+1
| | | | | * unpublic arrayWith * unindent
* fixes #20856; store defaults directly (#20859)ringabout2022-11-171-0/+13
| | | | | | | | | | | * fixes #20856; store defaults directly * fixes * fixes * check * fixes
* add more test for #20836 (#20842)Derek 呆2022-11-141-0/+15
|
* fixes object default fields bugs and add tests (#20839)ringabout2022-11-151-3/+34
| | | | | | | | | | | * 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>
* fixes #20836; fixes #20833; fixes `unsafeNew` (#20841)ringabout2022-11-141-0/+10
| | | | | * fixes #20836; fixes `unsafeNew` * fixes #20833
* Revert "fixes #20699; generate an empty struct for void type" (#20806)Andreas Rumpf2022-11-121-14/+15
| | | | | | | * Revert "fixes #20699; generate an empty struct for void type (#20790)" This reverts commit 8fcb9380f076e55bde29e365d395bd0603fc6229. * better fix [backport]
* fixes #20699; generate an empty struct for void type (#20790)Aditya Siram2022-11-091-0/+14
| | | | | * fixes #20699; generate an empty struct for void type * Add docs and test case.
* fixes #20740; fixes pre-existing field visibility issues and removes ↵ringabout2022-11-031-1/+21
| | | | | `efSkipFieldVisibilityCheck` (#20741) fixes #20740 pre-existing field visibility and refactoring
* fixes #20715; range[a..b] inside object variant fails (#20716)ringabout2022-10-311-0/+30
| | | | | | | | | | | * fixes #20715; range[a..b] inside object variant fails * step one fix * better fix * fixes private fields * mistake
* fixes #20681; add efSkipFieldVisibilityCheck to skip check (#20639)ringabout2022-10-283-29/+28
| | | | | | | | | | | | | | | | | * 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>
* fixes type check of ranges for default fields (#20660)ringabout2022-10-271-0/+11
|
* add type check for default fields (#20652)ringabout2022-10-251-0/+22
|
* Automatic dereferencing is removed (#20531)ringabout2022-10-101-0/+15
|
* remove implicit let/var default initialization (#20508)ringabout2022-10-071-16/+16
|
* add default field support for object in ARC/ORC (#20480)ringabout2022-10-042-0/+444
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* less test time costs (#20479)Bung2022-10-021-3/+2
|
* defaults to ORC (#19972)ringabout2022-09-233-20/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* remove deprecated type pragma syntax, fix bugs that required it (#20199)metagn2022-09-032-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
* nvro don't touch cdecl types [backport: 1.6] (#19461)flywind2022-01-281-0/+18
| | | * nvro don't touch cdecl types; fix #19342 again
* nrvo shouldn't touch bycopy object[backport:1.2] (#19385)flywind2022-01-142-0/+30
| | | fix nim-lang#19342
* fixes #17437 - crash where error reporting > 1 (#17547)Saem Ghani2021-03-291-0/+22
| | | | | | | | | | | * 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>
* remove some noises in tests (#16448)flywind2020-12-271-7/+3
|
* testament: error instead of silently ignore invalid targets; remove ↵Timothee Cour2020-12-141-1/+1
| | | | | | | | | | | 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>
* make megatest consistent with unjoined tests wrt newlines, honor newlines in ↵Timothee Cour2020-11-281-1/+1
| | | | | | | output spec (#16151) * fix megatest newlines * still allow missing trailing newline for now but in a more strict way than before
* close #4318(add testcase for #4318) (#15904)flywind2020-11-111-0/+12
| | | | | | | | | * 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>
* fix #14698 nkRecWhen caused internalAssert in semConstructFields when ↵Timothee Cour2020-07-271-0/+20
| | | | | | | | | | | 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>
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-281-1/+1
| | | | | | | | | | | | | | * 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.
* implement (#14114)cooldome2020-04-251-0/+6
| | | Co-authored-by: cooldome <ariabushenko@bk.ru>
* Turn some of the errors back into warningsZahary Karadjov2020-04-011-1/+1
|
* fix when statements in inheritable generic objects (#13667) [backport]Jasper Jenkins2020-03-171-0/+11
|
* Revert "printing float values will have one more digit. (#13276) [backport]" ↵Timothee Cour2020-02-081-3/+3
| | | | | (#13363) This reverts commit b2c6db97f9f477f6999fa9c7aae5e32f10b6b3fe.
* printing float values will have one more digit. (#13276) [backport]Arne Döring2020-02-071-3/+3
| | | | * printing float values will have one more digit. Fixes #13196
* Fixed objects being erroneously zeroed out before object construction ↵Neelesh Chandola2019-12-051-0/+22
| | | | (#12814) [backport]
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* Remove ENDB (#12095)Clyybber2019-08-311-1/+0
|
* Remove immediate pragma (#11308)Arne Döring2019-05-291-1/+1
| | | | | * remove immediate from tests * remove immediate from the compiler
* add tests, closes #3012, closes #7244narimiran2019-02-271-0/+21
|
* fixes #10195Araq2019-02-191-0/+5
|