summary refs log tree commit diff stats
path: root/tests/overload
Commit message (Collapse)AuthorAgeFilesLines
* Changing generic weight of `tyGenericParam` (#22143)Ryan McConnell2024-01-056-1/+115
| | | | | | | | | | | | This is in reference to a [feature request](https://github.com/nim-lang/Nim/issues/22142) that I posted. I'm making this PR to demonstrate the suggested change and expect that this should be scrutinized --------- Co-authored-by: Bung <crc32@qq.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Make `typeRel` behave to spec (#22261)Ryan McConnell2023-09-301-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | The goal of this PR is to make `typeRel` accurate to it's definition for generics: ``` # 3) When used with two type classes, it will check whether the types # matching the first type class (aOrig) are a strict subset of the types matching # the other (f). This allows us to compare the signatures of generic procs in # order to give preferrence to the most specific one: ``` I don't want this PR to break any code, and I want to preserve all of Nims current behaviors. I think that making this more accurate will help serve as ground work for the future. It may not be possible to not break anything but this is my attempt. So that it is understood, this code was part of another PR (#22143) but that problem statement only needed this change by extension. It's more organized to split two problems into two PRs and this issue, being non-breaking, should be a more immediate improvement. --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* make `var object` match better than `object` (#22152)metagn2023-06-251-0/+11
| | | | | | | | | | | * fix `var object` not matching better than `object` fixes #13302 * remove comment for brevity * try note * try minimize breaks
* clean up SOME pending/xxx/issue link comments (#21826)metagn2023-05-111-4/+2
| | | | | * clean up SOME pending/xxx/issue link comments * great
* fixes #20645 (#20646)Andreas Rumpf2022-10-241-1/+11
| | | | | * fixes #20645 * better bugfix
* fixes #3748 (#20563)Andreas Rumpf2022-10-141-0/+14
| | | | | | | | | * fixes #3748 * fix the regression * don't use the new allocator for the SSL wrapper * fixes regression
* 'lock levels' are deprecated, now a noop (#20539)ringabout2022-10-111-1/+1
| | | | | * 'lock levels' are deprecated, now a noop * fixes tests
* remove {.this.} pragma, deprecated since 0.19 (#20201)metagn2022-08-231-20/+0
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* deprecate unsafeAddr; extend addr (#19373)flywind2022-01-162-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * deprecate unsafeAddr; extend addr addr is now available for all addressable locations, unsafeAddr is deprecated and become an alias for addr * follow @Vindaar's advice * change the signature of addr * unsafeAddr => addr (stdlib) * Update changelog.md * unsafeAddr => addr (tests) * Revert "unsafeAddr => addr (stdlib)" This reverts commit ab83c99c507048a8396e636bf22d55fdd84d7d1c. * doc changes; thanks to @konsumlamm Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* style usages part one (openarray => openArray) (#19321)flywind2022-01-041-2/+2
| | | | | * style usages (openArray) * revert doc changes
* fixes #16325 [backport:1.4] (#18784)Andreas Rumpf2021-09-021-0/+20
|
* improve several tests in testament (#18635)Timothee Cour2021-08-081-1/+1
| | | | | | | | | | | * silence error output from template_various.nim * any => auto in tests * avoid showing failed for parseSpec since this is expected behavior in 2 cases: tincludefile.nim, tnav1.nim * enforce InheritFromException * fixup
* make megatest consistent with unjoined tests wrt newlines, honor newlines in ↵Timothee Cour2020-11-281-1/+4
| | | | | | | output spec (#16151) * fix megatest newlines * still allow missing trailing newline for now but in a more strict way than before
* close #8829(add testcase for #8829) (#15866)flywind2020-11-061-0/+18
|
* add testcase for #7416 (#15782)flywind2020-10-301-0/+9
|
* fix infinite recursion in typeRel (#15241)jcosborn2020-09-181-0/+45
| | | | | * fix generic constraints Co-authored-by: James Osborn <osborn@Jamess-MacBook-Pro.local>
* fix some issues overloading with generics and inheritance (#15211)jcosborn2020-08-271-5/+31
| | | | | * fix some issues overloading with generics and inheritance * fix passing procs with subtype matches
* fix overloading issue with generic invocation (#15135)jcosborn2020-08-181-0/+60
| | | | | * fix overloading issue with generic alias * add test for inheritance depth
* fix overloading case with generic alias (#15116)jcosborn2020-07-301-0/+105
| | | | | * fix overloading case with generic alias * revert reorganization of tests
* exp. features now in correct manual, closes #11932 (#14195)hlaaftana2020-05-021-0/+14
|
* fixes #11375 (#11376)Andreas Rumpf2019-06-021-0/+50
|
* fixes #8568 (#11303)Andreas Rumpf2019-05-222-0/+40
| | | | | | * fixes #8568 * fixes regression
* closes #6076Araq2019-05-221-0/+24
|
* fixes #11239Araq2019-05-221-0/+16
|
* fixes #9149 [backport]Araq2019-01-291-0/+22
|
* megatest checks output and nimoutArne Döring2018-12-111-19/+15
|
* require errormsg to be specified before file.Arne Döring2018-12-111-3/+1
|
* updated tests to be executedArne Döring2018-11-231-1/+4
|
* More descriptive names of test files (#9531)Miran2018-10-292-0/+0
| | | | | * change generic `tissues` name to more specific * change `tvarious` to more specific names
* Merge tests into a larger file (part 5 of ∞) (#9368)Miran2018-10-1615-343/+361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* make tests green againAndreas Rumpf2018-07-051-2/+2
|
* make tests green againAndreas Rumpf2018-07-052-2/+2
|
* Backwards-compatible support for keyword arguments in the command syntaxZahary Karadjov2018-05-071-2/+3
|
* Bugfix: Allow matching on nkExprEqExpr against varargs[untyped]Zahary Karadjov2018-05-071-0/+15
| | | | | | | | | This enables macros accepting arbitrary keyword arguments: log("foo", prop1 = "bar", prop2 = "baz") As an added bonus, simple templates with varargs arguments can now forward their params to procs accepting keyword arguments.
* make tests green againAndreas Rumpf2018-05-021-1/+1
|
* make tests green againAndreas Rumpf2018-04-221-1/+1
|
* fixes #7291Araq2018-03-051-1/+3
|
* better error messages: use <T1, T2> instead of (T1, T2) in order to prevent ↵Araq2018-02-101-1/+1
| | | | confusions with tuple types
* Fix compiler crash (#6773) (#6774)cooldome2017-11-181-0/+47
|
* added another test case for #6526Andreas Rumpf2017-10-281-0/+11
|
* fixes #6526Araq2017-10-271-5/+20
|
* Remove expr/stmt (#5857)Arne Döring2017-07-253-7/+9
|
* fix #1082Zahary Karadjov2017-06-201-1/+1
|
* close #3152; closed via f663ca7Zahary Karadjov2017-06-201-0/+4
|
* fix #5017; fix #5893Zahary Karadjov2017-06-201-0/+26
|
* fix varargs forwarding for templates; fixes #5455 (#5505)zah2017-03-131-0/+37
| | | | | * fix varargs forwarding for templates; fixes #5455 * document the macros' varargs change in the news for 0.16.2
* make more tests greenAraq2017-02-161-1/+1
|
* fixes #4671Andreas Rumpf2016-09-131-0/+17
|
* Add a test case for issue #4675.Matthew Baulch2016-09-033-0/+27
|
* fixes #4545Andreas Rumpf2016-08-041-0/+18
|