Commit Graph

33 Commits

Author SHA1 Message Date
metagn
09043f409f delay markUsed for converters until call is resolved (#24243)
fixes #24241
2024-10-06 08:10:37 +02:00
ringabout
379299a5ac fixes #22286; enforce Non-var T destructors by nimPreviewNonVarDestructor (#22975)
fixes #22286
ref https://forum.nim-lang.org/t/10642

For backwards compatibilities, we might need to keep the changes under a
preview compiler flag. Let's see how many packags it break.

**TODO** in the following PRs

- [ ] Turn the `var T` destructors warning into an error with
`nimPreviewNonVarDestructor`

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2023-11-25 18:27:27 +01:00
Jake Leahy
741fed716e Use analyseIfAddressTaken logic for checking if address is taken in converter (#21533)
* Add a test case

There are way more test cases (See all branches of analyseIfAddressTaken but this covers at least a second branch

* Port analyseIfAddressTaken from semexprs to sigmatch

This was done since we cannot import sem or semexprs (circular import) but we need the rest of the logic. In needs to be done here since the converter isn't semmed afterwards and so we can't just leave the process til later use the version from semexprs

* Less hacky solution which has the checking be done in analyseIfAddressTakenInCall

This was done instead of the recommendation on removing it since sfAddrTaken is used in places other than the backend

* Remove weird whitespace

* Still check nkHiddenAddr if we are checking a converter
2023-03-20 18:48:13 +01:00
ringabout
723a71bd22 follow up #20109; remove shallow seqs/strings for ORC (#20502)
* remove `shallow` seqs/strings for ORC

* add a changelog item

* change url of DelaunayNim
2022-10-06 07:16:50 +02:00
flywind
5a995ffc53 fix #18986; Import/except doesn't work on devel [backport: 1.6] (#19687)
* fix #18986; Import/except doesn't work on devel [backport: 1.6]

* add testcase
2022-04-06 16:17:09 +02: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
502ac4ed5e fixes a converter handling regression that caused private converters to leak into client modules; fixes #19213; [backport:1.6] (#19229) 2021-12-09 13:56:51 +01:00
Jason Beetham
83a2515af7 Fixed generic distinct conversions for 'var' (#18837)
* SameTypeAux now properly traverses generic distincts

* Smarter traversal of distincts

* Removed redundant check

* Fixed nkConv for jsgen

* Added test for non distinct nkConv

* using skiptypes for distinct now

* Fixed genaddr for nkconv
2021-10-26 11:27:11 +02:00
Saem Ghani
72b89eff82 semLambda removed, semProcAux reworked (#17379)
* simplified proc-like name ident to symbol code

* wip - reworking generic param sem

* wip - closer to removing nkEmpty generic params

* it's hacky but tests pass

* slowly tweaking semProcAux to take on semLambda

* fix pragma superset check proto vs current

* Set the symbol owner earlier

* partial progress reworking proto

found bug where default values between forward and impl lead to overload
resolution issues.

* simplified pragma handling and callConv checks

Co-authored-by: Clyybber <Clyybber@users.noreply.github.com>

* partially working

* cgexprs issue

* It works!

* comment clean-up

* clean-up asserts, comments, and other bits

* add isGenericParams, inline isGeneric queries

* seeing if this is sufficiently consistent
* can use this approach or continue it in a further PR

* commentary about nullary generics and clean-ups

* fixed a mistake in PNode isGenericRoutine

* Some small cleanups

* Small cleanup

* for func lambdas ensure we use lambda pragmas

* add some basic compileTime func tests

* [ci skip] remove comments

Co-authored-by: Clyybber <Clyybber@users.noreply.github.com>
Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-03-17 19:51:50 +01:00
flywind
0c128259bb close #7097 add testcase (#16682) 2021-01-11 15:13:13 +01:00
cooldome
0286a0879b fix #16651 (#16658)
* fix #16651
2021-01-11 10:09:38 +01:00
flywind
1655c04aa3 add testcase for #9165 (#15787) 2020-10-30 09:57:02 +01:00
Timothee Cour
dfe51d10a1 addQuitProc now works with closures, and c, js(node/browser) backend; fix some bugs in testament (#14342)
* make addQuitProc great again

* fix bugs in testament

* fix test

* change 2016 => 2020

* addQuitProc => addExitProc + locks

* move to std/exitprocs
2020-06-16 11:43:48 +02:00
Federico Ceratto
39290cf88c Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
Arne Döring
28394153ab 32 bit fixes (#10608) 2019-02-13 23:30:14 +01:00
Arne Döring
1105d03644 require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
cooldome
c50a04adc5 More converter fixes (#9737)
* fixes #9735
* fixes #9736
* fixes #3503
2018-11-26 09:51:13 +01:00
Arne Döring
031bfdec6f make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
cooldome
c5c4da4f3c Converter bug fixes (#9700)
* Fixes #9698
* Fixes #9699
2018-11-15 13:14:48 +01:00
LemonBoy
16a70c84aa Fixes 6544 (#9427)
* Fix call to converters with var/lent args

Fixes #6544

* Fix printing of lent types

* lent is only valid for result types
2018-10-19 21:04:32 +02:00
cooldome
aa1cdebdc2 Converters to take into account constraints. Fixes #7520 (#8593) 2018-08-13 15:02:20 +02:00
LemonBoy
5c5388c0a6 Handle subtype relations for converter parameters (#8248)
Fixes #7098
2018-07-09 20:05:53 +02:00
Andreas Rumpf
74fe7a800b make tests green again 2018-05-02 13:34:54 +02:00
Andreas Rumpf
4d5c0027e6 fixes #4537 2016-08-02 14:53:21 +02:00
Andreas Rumpf
9fbd9e9028 use correct issue number 2016-07-29 01:00:25 +02:00
Andreas Rumpf
1ddd2a3865 fixes #4432 2016-07-29 01:00:25 +02:00
Andreas Rumpf
d4573f1762 fixes #888 2016-07-19 20:19:52 +02:00
Andreas Rumpf
a2db3c24d1 fixes #3799 2016-01-30 23:09:55 +01:00
Adam Strzelecki
e80465dacf tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:04:32 +02:00
def
cb3c99fe1f Fix tests some more 2015-03-17 00:02:47 +01:00
Araq
8be177627a fixes #1181, fixes #1715 2014-12-16 14:49:47 +01:00
Araq
4d8c127838 made some tests green 2014-08-13 01:30:42 +02:00
Araq
20b5f31c03 new tester; all tests categorized 2014-01-13 02:10:03 +01:00