Ryan McConnell
b2ca6bedae
Make typeRel behave to spec ( #22261 )
...
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 >
2023-09-30 06:34:14 +02:00
metagn
20037a4749
make var object match better than object ( #22152 )
...
* fix `var object` not matching better than `object`
fixes #13302
* remove comment for brevity
* try note
* try minimize breaks
2023-06-25 16:52:16 +02:00
metagn
02be212dae
clean up SOME pending/xxx/issue link comments ( #21826 )
...
* clean up SOME pending/xxx/issue link comments
* great
2023-05-11 10:23:52 +02:00
Andreas Rumpf
48d41ab375
fixes #20645 ( #20646 )
...
* fixes #20645
* better bugfix
2022-10-24 21:41:29 +02:00
Andreas Rumpf
07b645342a
fixes #3748 ( #20563 )
...
* fixes #3748
* fix the regression
* don't use the new allocator for the SSL wrapper
* fixes regression
2022-10-14 12:00:38 +02:00
ringabout
5602183234
'lock levels' are deprecated, now a noop ( #20539 )
...
* 'lock levels' are deprecated, now a noop
* fixes tests
2022-10-11 09:17:09 +02:00
metagn
f6eb1d4d7d
remove {.this.} pragma, deprecated since 0.19 ( #20201 )
...
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-08-23 19:44:37 +02:00
flywind
d102b2f54c
deprecate unsafeAddr; extend addr ( #19373 )
...
* 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 ab83c99c50 .
* 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 >
2022-01-16 11:08:38 +01:00
flywind
9df195ef58
style usages part one (openarray => openArray) ( #19321 )
...
* style usages (openArray)
* revert doc changes
2022-01-04 13:29:50 +01:00
Andreas Rumpf
a7cae2bda2
fixes #16325 [backport:1.4] ( #18784 )
2021-09-02 17:15:11 +02:00
Timothee Cour
24445d31b3
improve several tests in testament ( #18635 )
...
* 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
2021-08-08 19:28:49 +02: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
fb60e35a54
close #8829(add testcase for #8829 ) ( #15866 )
2020-11-06 23:39:20 +08:00
flywind
3028c1be82
add testcase for #7416 ( #15782 )
2020-10-30 09:59:38 +01:00
jcosborn
e56d50d747
fix infinite recursion in typeRel ( #15241 )
...
* fix generic constraints
Co-authored-by: James Osborn <osborn@Jamess-MacBook-Pro.local >
2020-09-18 11:21:37 +02:00
jcosborn
d11933ad99
fix some issues overloading with generics and inheritance ( #15211 )
...
* fix some issues overloading with generics and inheritance
* fix passing procs with subtype matches
2020-08-27 12:56:38 +02:00
jcosborn
e194cb41a4
fix overloading issue with generic invocation ( #15135 )
...
* fix overloading issue with generic alias
* add test for inheritance depth
2020-08-18 08:23:19 +02:00
jcosborn
32c6146200
fix overloading case with generic alias ( #15116 )
...
* fix overloading case with generic alias
* revert reorganization of tests
2020-07-30 15:34:11 +02:00
hlaaftana
f50377986a
exp. features now in correct manual, closes #11932 ( #14195 )
2020-05-02 22:30:08 +02:00
Andreas Rumpf
4a35d2b571
fixes #11375 ( #11376 )
2019-06-02 06:33:35 +02:00
Andreas Rumpf
fd16875561
fixes #8568 ( #11303 )
...
* fixes #8568
* fixes regression
2019-05-22 20:59:54 +02:00
Araq
85ac4bfff6
closes #6076
2019-05-22 15:42:34 +02:00
Araq
90e882d55b
fixes #11239
2019-05-22 07:41:16 +02:00
Araq
07a0a61875
fixes #9149 [backport]
2019-01-29 14:31:43 +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
Arne Döring
e012eb1001
updated tests to be executed
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
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
Andreas Rumpf
ae82406c8b
make tests green again
2018-07-05 19:14:18 +02:00
Andreas Rumpf
0926754e68
make tests green again
2018-07-05 15:51:04 +02:00
Zahary Karadjov
b0d85b0adf
Backwards-compatible support for keyword arguments in the command syntax
2018-05-07 09:37:49 +02:00
Zahary Karadjov
e678a4285d
Bugfix: Allow matching on nkExprEqExpr against varargs[untyped]
...
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.
2018-05-07 09:37:49 +02:00
Andreas Rumpf
74fe7a800b
make tests green again
2018-05-02 13:34:54 +02:00
Andreas Rumpf
34b333b140
make tests green again
2018-04-22 07:10:55 +02:00
Araq
15e044416f
fixes #7291
2018-03-05 13:38:32 +01:00
Araq
ef6eda4cb4
better error messages: use <T1, T2> instead of (T1, T2) in order to prevent confusions with tuple types
2018-02-10 20:55:21 +01:00
cooldome
8443e3f6be
Fix compiler crash ( #6773 ) ( #6774 )
2017-11-18 09:21:37 +01:00
Andreas Rumpf
788cf42612
added another test case for #6526
2017-10-28 12:07:54 +02:00
Araq
9c00f6decd
fixes #6526
2017-10-27 20:55:36 +02:00
Arne Döring
000b8afd26
Remove expr/stmt ( #5857 )
2017-07-25 09:28:23 +02:00
Zahary Karadjov
24966e006a
fix #1082
2017-06-20 11:29:42 +02:00
Zahary Karadjov
b101a59734
close #3152 ; closed via f663ca7
2017-06-20 11:29:42 +02:00
Zahary Karadjov
9c6fe59b55
fix #5017 ; fix #5893
2017-06-20 11:29:42 +02:00
zah
650b20dc5e
fix varargs forwarding for templates; fixes #5455 ( #5505 )
...
* fix varargs forwarding for templates; fixes #5455
* document the macros' varargs change in the news for 0.16.2
2017-03-13 22:02:11 +01:00
Araq
aebe9d7d13
make more tests green
2017-02-16 01:43:12 +01:00
Andreas Rumpf
3a5edd2c6c
fixes #4671
2016-09-13 16:33:43 +02:00
Matthew Baulch
9a2b98cd8b
Add a test case for issue #4675 .
2016-09-03 21:21:06 +10:00
Andreas Rumpf
7ac0b20339
fixes #4545
2016-08-04 01:37:41 +02:00
Kier Davis
023f1da40a
Add regression test for fix for #4475
2016-07-11 15:16:23 +01:00