summary refs log tree commit diff stats
path: root/tests/cpp
Commit message (Collapse)AuthorAgeFilesLines
* C++: ptr fields now pulls the whole type if it's a member in nkDotExpr (#22855)Juan M Gómez2023-10-232-1/+18
|
* adds support for noDecl in constructor (#22811)Juan M Gómez2023-10-111-1/+10
| | | Notice the test wouldnt link before
* marking a field with noInit allows to skip constructor initialiser (#22802)Juan M Gómez2023-10-081-0/+30
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* C++ Adds support for default arg using object construction syntax. Fixes a ↵Juan M Gómez2023-09-281-2/+29
| | | | | | | | | | compiler crash (#22768) `Foo()` below makes the compiler crash. ```nim proc makeBoo(a:cint = 10, b:cstring = "hello", foo: Foo = Foo()): Boo {.importcpp, constructor.} ```
* `constructor` now uses `result` instead of `this` (#22724)Juan M Gómez2023-09-191-4/+4
|
* prevents declaring a constructor without importcpp fixes #22712 (#22715)Juan M Gómez2023-09-181-0/+15
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* implements RFC: [C++] Constructors as default initializers (#22694)Juan M Gómez2023-09-141-0/+33
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #22680 Nim zero clear an object inherits C++ imported class when a ↵Juan M Gómez2023-09-111-0/+50
| | | | proc return it (#22684)
* fixes #22669 constructor pragma doesnt init Nim default fields (#22670)Juan M Gómez2023-09-101-1/+34
| | | | | | | fixes #22669 constructor pragma doesnt init Nim default fields --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #22679 Nim zero clear an object contains C++ imported class when a ↵Juan M Gómez2023-09-101-0/+50
| | | | proc return it (#22681)
* fixes #22662 Procs with constructor pragma doesn't initialize object's ↵Juan M Gómez2023-09-081-1/+22
| | | | | | | | | | fields (#22665) fixes #22662 Procs with constructor pragma doesn't initialize object's fields --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* adds support for functor in member (#22433)Juan M Gómez2023-08-101-0/+11
| | | | | * adds support for functor in member * improves functor test
* makes asmnostackframe work with cpp member #22411 (#22429)Juan M Gómez2023-08-091-0/+37
|
* [C++] Member pragma RFC (https://github.com/nim-lang/RFCs/issues/530) (#22272)Juan M Gómez2023-08-071-0/+53
| | | | | | | | | | * [C++] Member pragma RFC #530 rebase devel * changes the test so `echo` is not used before Nim is init * rebase devel * fixes Error: use explicit initialization of X for clarity [Uninit]
* fixes an issue where byref wasnt properly handled when using it in a generic ↵Juan M Gómez2023-07-291-0/+27
| | | | | | | param (#22337) * fixes an issue where byref wasnt properly handled when using it in a generic param * removes unreachable check
* Expands codegenDecl to work in function params. fixes #22306 (#22307)Juan M Gómez2023-07-231-0/+17
| | | | | | | * Expands codegenDecl to work in function params. fixes #22306 * makes the test more concrete so T{lit} params dont match * adds sfCodegenDecl
* Fixes Naive virtual crash the compiler fixes #22269 (#22271)Juan M Gómez2023-07-161-0/+4
| | | | | * Fixes Naive virtual crash the compiler fixes #22269 * adds type specific test
* Implements: [C++] constructor pragma improvement (fix #21921) (#21916)Juan M Gómez2023-05-301-2/+33
| | | | | | | | | | | | | | | * implements: [C++] constructor pragma improvement (fix #21921) t * fix test so it doesnt use echo in globals * Update compiler/ccgtypes.nim * Update lib/std/private/dragonbox.nim --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* actually fixes #21889 "constructor pragma doing nothing in globals" (#21897)Juan M Gómez2023-05-241-0/+24
| | | actually fixes #21889
* implements allow byref to work in params #21873 (#21875)Juan M Gómez2023-05-211-5/+14
|
* Cpp Vfunctions draft (#21790)Juan M Gómez2023-05-171-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * introduces virtual pragma, modifies proc def, prevents proc decl * marks virtual procs as infix * forward declare vfuncs inside the typedef * adds naked callConv to virtual * virtual proc error if not defined in the same top level scope as the type * first param is now this. extracts genvirtualheaderproc * WIP syntax * supports obj. Removes the need for the prefix * parameter count starts as this. Cleanup * clean up * sem tests * adds integration tests * uses constraint to store the virtual content * introduces genVirtualProcParams --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Revert "Fix #13093 C++ Atomics: operator= is implicitly deleted because the ↵ringabout2023-01-272-44/+0
| | | | | | | default definition would be ill-formed " (#21307) Revert "Fix #13093 C++ Atomics: operator= is implicitly deleted because the default definition would be ill-formed (#21169)" This reverts commit a7bae919adb952362cb53206140872d2b7424b47.
* Fix #13093 C++ Atomics: operator= is implicitly deleted because the default ↵Bung2023-01-272-0/+44
| | | | | | | | | | | | | definition would be ill-formed (#21169) * add test * fix #17982 Invalid C++ code generation when returning discardable var T * fix #13093 * cpp atomic good example * clearify the condition
* add the cpp target (#21164)ringabout2022-12-231-0/+4
| | | The issue is related to cpp codegen, the previous test doesn't test cpp backend, which will join into the megatest.
* fix #12946 Bad C++ codegen on distinct generics C++ types (#21157)Bung2022-12-231-0/+4
|
* ship a modern nimble with lock files support (#21061)ringabout2022-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * change `include genode/env` to an import ref https://github.com/nim-lang/Nim/commit/0b262e9496387d5e8adc0c5f6020b3f3300e8f79#diff-8718bd20d8f61d6638d3d64b19efc31bcd40a6d5be8215b2a1f0b75ed93e8d56 * fixes comments * ship a modern nimble with lock files support * not sure whether the latest nimble has a regression now I'm trying 0.14.0 * change `pkgs` to `pkgs2` (#21073) * overwrite problematic packages * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review
* closes #4678; add testcase (#20634)ringabout2022-10-241-0/+16
|
* moderate system cleanup & refactor (#20355)metagn2022-09-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * system refactor, move out 600 lines * compilation, slice, backwardsindex, misc_num moved out of system * some procs/types moved into arithmetics, basic_types * system no longer depends on syncio * some procs moved around to fit with their surroundings * make exceptions an import, old ops to misc_num * move instantiationInfo back * move back nim version, fix windows echo * include compilation * better docs for imported modules, fix unsigned ops also remove ze, ze64, toU8, toU16, toU32 with nimPreviewSlimSystem * fix terminal * workaround IC test & weird csize bug, changelog * move NimMajor etc back to compilation, rebase for CI * try ic fix * form single `indices`, slim out TaintedString, try fix IC * fix CI, update changelog, addQuitProc * fix CI * try fix CI * actually fix CI finally hopefully * Update lib/system/compilation.nim Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> * update kochdocs * hopefully fix csize uses for slimsystem * fix tquit Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* fix #17351; switch to c++17 and remove hacks (#20407)ringabout2022-09-231-1/+11
| | | | | * fix #17351; switch to c++17 * remove workaround
* remove deprecated type pragma syntax, fix bugs that required it (#20199)metagn2022-09-033-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
* move io out of system (#19442)flywind2022-02-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * move io out of system * fix tests * fix tests * next step * rename to syncio * rename * fix nimscript * comma * fix * fix parts of errors * good for now * fix test
* style usages part one (openarray => openArray) (#19321)flywind2022-01-041-4/+4
| | | | | * style usages (openArray) * revert doc changes
* fix #18410 (Errors initializing an object of RootObj with the C++ backend) ↵flywind2021-10-311-0/+15
| | | | | | | | | | | | | [backport] (#18836) * fix #18410 * one line comment * typo * typo * cover cpp
* refs #18011 disable some newly failing tests on cpp windows; refs #17946 ↵Timothee Cour2021-05-142-2/+6
| | | | increase timeout for tchannels (#18012)
* system.nim cleanup some exported constants which should never have be… ↵Andreas Rumpf2021-05-011-1/+1
| | | | | | (#17909) * system.nim cleanup some exported constants which should never have been exported
* `--nilseqs` is now a deprecated noop (#17211)Timothee Cour2021-03-011-1/+1
| | | | | * --nilseqs is now a deprecated noop * fix tests; fix: future => sugar
* remove tests/deps/ (#17132)Timothee Cour2021-02-231-1/+1
| | | | | | | | | * remove tests/deps/ * fix tests * fix tests/manyloc/keineschweine/lib/zlib_helpers.nim * fixup
* close #4834 add testcase (#16649)flywind2021-01-091-0/+17
|
* improve examples in manual (#16497)flywind2020-12-291-1/+1
| | | | | | | | | | | | | * improve examples in manual * Update doc/manual.rst Co-authored-by: Clyybber <darkmine956@gmail.com> * Update tests/cpp/ttemplatetype.nim Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Clyybber <darkmine956@gmail.com>
* 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>
* typeinfo minor improvement (#16083)flywind2020-11-231-0/+0
| | | | | | | | | * typeinfo minor improvement * minor * Update lib/core/typeinfo.nim * rename typeinfo
* fix typos and deprecation warnings for tconvariancerules.nim (#13772)Arne Döring2020-03-271-21/+20
|
* Attempt to finish off araq cpp exceptions (#13695)cooldome2020-03-192-2/+3
| | | | | | | | | | | | | | | * config update * disable a questionable test * remove c++ exception handling IDs, new impl doesn't require it anymore * C++ based exceptions finally work * fixes bootstrapping problem in C++ mode * teach GCC it's 2020 now * more bugfixes for C++ based exception handling * apply cooldome's patch * another attempt to enable C++11 * bug fix Co-authored-by: Araq <rumpf_a@web.de> Co-authored-by: cooldome <ariabushenko@bk.ru>
* fix sets of scoped imported enums (#13666)Jasper Jenkins2020-03-172-0/+12
|
* test suite: rename tests containing 'fail' for easier search in logsAraq2019-11-261-0/+0
|
* introduce csize_t instead of fixing csize (#12497)Arne Döring2019-10-312-4/+4
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* no commas for empty importcpp splat params (#12183)Jasper Jenkins2019-09-121-2/+9
|
* exportc now mangles same as importc, fixes #10578 (#12144)Timothee Cour2019-09-062-0/+31
| | | | | | | * fixes #10578 * add tests * add changelog * add {.exportcpp.}
* fixes #11118Andrii Riabushenko2019-04-301-0/+24
|