Commit Graph

115 Commits

Author SHA1 Message Date
ringabout
cc08a9015e fixes #21263; consider all candidates for concept matches (#21265) 2023-01-17 23:15:23 +01:00
metagn
555c5ed1a7 fix bugs with dot & call operators [backport] (#20931)
* better error messages for dot operators [backport]

fixes #13063

* also fixes #7777

* fix #6981 and #9831 too

* fix

* minor improvement

* sus test fixes

* make test multiplatform lol

* fix nimsuggest test, extra improvements
2022-11-28 21:33:02 +01:00
konsumlamm
4491da4c4d Support doc comments in new-styled concepts (#20752)
Support comments in new-styled concepts
2022-11-04 20:32:41 +08:00
ringabout
7739e23420 defaults to ORC (#19972)
* 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>
2022-09-23 13:05:05 +02:00
nc-x
4680ab61c0 Fix fixAbstractType for user defined typeclasses, fixes #19730 & #18409 (#19732) 2022-04-30 15:58:58 +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
konsumlamm
ac5435ecd0 Make error message for empty new-styled concept more descriptive (#18506)
* Allow empty new-styled concept

Slightly improve error messages

* Make empty new-styled concepts an error
2021-07-18 10:49:03 +02:00
flywind
7bfb9f0002 close #17636 (#17643) 2021-04-06 16:20:01 +02:00
Andreas Rumpf
6278b5d89a new-style concepts implementation, WIP (#15251)
* fixes #15210 [backport:1.2]

* make tests green
* make ordinal work
* makes Swapable test compile
* make Indexable example work
* concepts: 'self' is now 'Self'
* concepts: make Dictionary example compile
* document the new concept implementation
* concepts: make typeDesc work properly
* concepts: allow documentation comments (d'oh)
2021-02-24 13:17:33 +01:00
Clyybber
e4ad0ae5c4 Add testcase for #16897 (#16917) 2021-02-02 21:43:02 +01: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
8f7a013cc7 close #8558(add testcase for #8558) (#15872) 2020-11-07 07:59:47 +00:00
flywind
2de90a14cb add testcase for #8012 (#15785) 2020-10-30 09:57:26 +01:00
jcosborn
add003a074 fix assignment to converted concept type (#15051)
* fix assignment to converted concept type

* check for resolved concepts

* add extra test
2020-07-24 21:19:11 +02:00
Juan Carlos
5d5df4a394 Clean out Deprecated proc (#14797)
* Remove and/or clean out Deprecated 'add' proc for floats
* Update a test
2020-06-29 09:33:07 +02:00
cooldome
eefada8a88 fix #14217 (#14218)
* fix #14217

Co-authored-by: cooldome <ariabushenko@bk.ru>
2020-05-05 07:26:32 +02:00
Jacek Sieka
7d6cbf290a Error -> Defect for defects (#13908)
* 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.
2020-04-28 19:56:01 +02:00
Andreas Rumpf
73eff1f457 fixes #12741 (#14005)
* fixes #12741
* updated tests
2020-04-19 11:59:01 +02:00
Timothee Cour
dd362ab4c0 fix #13538 sigmatch errors are now sorted (#13701)
* fix #13538 sigmatch now sorted and has reliable order

* re-enable tests that were disabled because of that bug

* fix remaining tests and un-disable 2 other tests that were affected by this bug
2020-03-20 09:28:03 +01:00
Araq
942db8c5f3 fixes a test case 2019-12-24 17:33:27 +01:00
Andreas Rumpf
3ba3307d61 remove deprecated procs (#12535) 2019-11-05 11:05:46 +01:00
Jasper Jenkins
245a954b25 ungeneric unsigned ops (#12230)
* ungenericise unsigned ops, remove nimNewShiftOps
* fix/remove tests
* update t6448
* fix line info
* disable on 32bit
* fix different line info
* add changelog entry
2019-10-11 08:38:08 +02:00
Andreas Rumpf
c0d240b8cd fixes #11807 (#11900)
* fixes #11807
* make tests green again
2019-08-07 22:40:58 +02:00
Arne Döring
803406d07c fix #11854 (#11857) 2019-07-30 17:24:42 +02:00
Timothee Cour
063ae96a66 address comments 2019-07-08 15:24:20 -07:00
Timothee Cour
5fce81edfd make tests/concepts/t3330.nim disabled again: the order of candidates is machine dependent 2019-07-08 15:24:20 -07:00
Timothee Cour
b80d70b0f3 fix tests 2019-07-08 15:24:20 -07:00
Araq
f5a7a3bee9 make megatest work again 2019-04-02 08:23:13 +02:00
Arne Döring
28394153ab 32 bit fixes (#10608) 2019-02-13 23:30:14 +01:00
Arne Döring
3859878db8 megatest checks output and nimout 2018-12-11 21:23:22 +01:00
Arne Döring
2a4c09ff88 megatest can be executed 2018-12-11 21:23:21 +01:00
Arne Döring
1105d03644 require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
Araq
562d185cb7 cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +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
Andreas Rumpf
f5a2c6e19d make tests green again 2018-10-24 22:29:01 +02: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
Timothee Cour
3e2d8c1c53 correctly render AST in doAssert/assert condition: fixes #8518; refs #9301 (#9332)
* fixes #8518; refs #9301; correctly render AST in doAssert condition
2018-10-14 00:17:10 +02:00
Miran
d570dea480 put several issues in tests (#9352)
* put several issues in tests

* remove wrong test
2018-10-13 20:17:59 +02:00
Miran
7f18d7cbc1 Merge tests into a larger file (part 1 of ∞) (#9318)
* merge actiontable tests

* merge arithm tests

* merge array tests

* merge assign tests

* merge bind tests

* merge casestmt tests

* merge closure tests

* merge cnt seq tests

* merge collections tests

* merge concept issues tests

* merge concept tests

* fix failing tests

* smaller outputs

Use `doAssert` where possible.

* fix wrong output

* split `tcomputedgoto`

* revert merging concepts

* fix failing test
2018-10-12 17:02:46 +02:00
xzfc
8fc7cecfa2 compiler: show name of instantiating context in error traces (#6763) (#9207) 2018-10-11 09:34:56 +02:00
Araq
1428aeccfb closes #5868 2018-10-03 00:08:45 +02:00
Araq
bf85955802 fixes #7092 2018-10-02 23:45:27 +02:00
Araq
400a7ff1bb closes #6249 2018-10-02 19:41:47 +02:00
zah
96de224a63 Fix #8126 (#8712)
This is a temporary fix that will be reworked in a follow up commit
that aims to eliminate the tfExplicit flag from the compiler. The
complete and proper fix was considered too risky for inclusion just
before our 0.19 release.
2018-08-21 22:14:12 +02:00
andri lim
4d5cce9882 fixes #6255, add system.ashr arithmetic right shift (#8547) 2018-08-07 18:41:30 +02:00
LemonBoy
ba1f036a56 Correctly hash inferred types (#8286)
We don't really want to hash the tyInferred container since that'd make
the "real" type and its inferred counterpart produce different hashes
and types for the very same type.

Fixes #8280
2018-07-12 13:00:11 +02:00
Andreas Rumpf
6b8167aaa1 make concepts tests green again 2018-07-06 11:16:05 +02:00
LemonBoy
eec239e851 Fix constant folding of len() with concept type (#8143)
Fixes #7952
2018-06-30 13:43:55 +02:00
LemonBoy
bb23d903b6 Don't consider concept types as non-complex during codegen (#8119)
Fixes #7125
2018-06-27 17:21:53 +02:00