summary refs log tree commit diff stats
path: root/tests/errmsgs
Commit message (Collapse)AuthorAgeFilesLines
* fixes #23060; `editDistance` wrongly compare the length of rune strings (#23062)ringabout2023-12-131-0/+5
| | | fixes #23060
* fixes #22996; `typeAllowedCheck` for default fields (#22998)ringabout2023-11-291-0/+7
| | | fixes #22996
* fixes #22753; Nimsuggest segfault with invalid assignment to table (#22781)ringabout2023-10-022-5/+45
| | | | | | | | fixes #22753 ## Future work We should turn all the error nodes into nodes of a nkError kind, which could be a industrious task. But perhaps we can add a special treatment for error nodes to make the transition smooth.
* fixes #10542; suppresses varargs conversion warnings (#22757)ringabout2023-09-261-0/+24
| | | | fixes #10542 revives and close #20169
* make expressions opt in to symchoices (#22716)metagn2023-09-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | refs #22605 Sym choice nodes are now only allowed to pass through semchecking if contexts ask for them to (with `efAllowSymChoice`). Otherwise they are resolved or treated as ambiguous. The contexts that can receive symchoices in this PR are: * Call operands and addresses and emulations of such, which will subject them to overload resolution which will resolve them or fail. * Type conversion operands only for routine symchoices for type disambiguation syntax (like `(proc (x: int): int)(foo)`), which will resolve them or fail. * Proc parameter default values both at the declaration and during generic instantiation, which undergo type narrowing and so will resolve them or fail. This means unless these contexts mess up sym choice nodes should never leave the semchecking stage. This serves as a blueprint for future improvements to intermediate symbol resolution. Some tangential changes are also in this PR: 1. The `AmbiguousEnum` hint is removed, it was always disabled by default and since #22606 it only started getting emitted after the symchoice was soundly resolved. 2. Proc setter syntax (`a.b = c` becoming `` `b=`(a, c) ``) used to fully type check the RHS before passing the transformed call node to proc overloading. Now it just passes the original node directly so proc overloading can deal with its typechecking.
* type annotations for variable tuple unpacking, better error messages (#22611)metagn2023-09-011-1/+1
| | | | | | | | | * type annotations for variable tuple unpacking, better error messages closes #17989, closes https://github.com/nim-lang/RFCs/issues/339 * update grammar * fix test
* round out tuple unpacking assignment, support underscores (#22537)metagn2023-08-241-1/+1
| | | | | | | | | | | | | | | * round out tuple unpacking assignment, support underscores fixes #18710 * fix test messages * use discard instead of continue Co-authored-by: Andreas Rumpf <rumpf_a@web.de> --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #6499; disallow built-in procs used as procvars (#22291)ringabout2023-07-191-0/+6
|
* fixes #22049; fixes #22054; implicit conversion keeps varness (#22097)ringabout2023-06-161-0/+9
| | | | | | | | | | | | | | | | | | | | | * fixes #22054; codegen for var tuples conv * rethink fixes * add test cases * templates only * fixes var tuples * keep varness no matter what * fixes typ.isNil * make it work for generics * restore isSubrange * add a test case as requested
* some test cleanups & category reorganization (#22010)metagn2023-06-067-0/+59
| | | | | | | | | | | | | | | | | * clean up some test categories * mention exact slice issue * magics into system * move trangechecks into overflow * move tmemory to system * try fix CI * try fix CI * final CI fix
* properly disallow unresolved generic proc values (#22005)metagn2023-06-051-0/+10
| | | | | | | * properly disallow unresolved generic proc values * mirrors semoperand * shallow efTypeAllowed, add back special case
* clean up SOME pending/xxx/issue link comments (#21826)metagn2023-05-111-22/+6
| | | | | * clean up SOME pending/xxx/issue link comments * great
* cheap fix for #10853 + better tuple subscript error message (#21767)metagn2023-05-022-0/+5
| | | | | | | * cheap fix for #10853 * also better tuple subscript error message * weird
* alias syntax fixes, improvements and tests (#21671)metagn2023-04-221-10/+10
| | | | | | | | | | | | | * alias syntax fixes, improvements and tests * even better, cannot use alias syntax with generics * more type tests, improve comment * fix again * consistent error message + make t5167_5 work * more comments, remove {.noalias.}
* make --exceptions:quirky work with C++ (#21581)Andreas Rumpf2023-03-311-1/+1
| | | | | * make --exceptions:quirky work with C++ * make tests green again
* hopefully easier to understand error message (#21585)Andreas Rumpf2023-03-301-2/+2
|
* closes #16654; add a test case (#21478)ringabout2023-03-061-0/+12
|
* tests/errmsgs/tcall_with_default_arg.nim: sync (#21237)Anna2023-03-011-1/+1
|
* tests: explicitly enable stack traces where needed (#21236)Anna2023-03-013-17/+20
| | | | | * tests/assert/tassert_c.nim: explicitly enable stack traces * tests/errmsgs: explicitly enable stack traces
* fixes #19795; fixes #11852; fixes #19974; remove parsing pipeline, Nim now ↵ringabout2023-02-221-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parses the whole module at one time (#21379) * fixes #19795; remove parse pipeline * isScript * fixes nimscriptapi * don't touch reorder * check script * fixes tests * it seems implicit imports of system cause troubles * access the first child of `nkStmtList` * ignore comments * minor messages * perhaps increases hloLoopDetector * the module is a stmtList, which changes the errors * fixes nimdoc * fixes tlinter * fixes nim secret tests * fixes arc_misc * fixes nim secret tests again * safe; fixes one more test * GlobalError is the root cause too * fixes parsing errors * put emit types to the cfsForwardTypes section * fixes #11852; `{.push checks:off}` now works in procs * disable navigator * fixes nimdoc * add tests for JS * fixes nimsuggest
* close #21257 (#21275)metagn2023-01-181-0/+20
| | | | | * close #21257 * fix generics
* fixes #21195; `std/assertions` continue to use `sysFatal` when ↵ringabout2022-12-291-2/+2
| | | | | | | | | | | | | `nimPreviewSlimSystem` is not defined (#21196) * fixes #21195; `std/assertions` continue to use `sysFatal` * try includes * make `std/assertions` self-contained * fixes tests * fixes tests
* fixes #14444; add `genLineDir` before assignment (#21201)ringabout2022-12-291-0/+14
| | | | | | | * fixes #14444; add `genLineDir` before raises * add a test case * fixes differently
* less verbose type mismatch messages (#21191)ringabout2022-12-282-0/+44
| | | | | | | | | * less verbose type mismatch messages * Update compiler/types.nim * fixes i386 * fixes i386
* fix for bad error message with const in case statement (#21182)metagn2022-12-271-0/+7
| | | | | | | * preliminary fix for bad error message with const * add test case * fix tmatrixconcept and tmatrixlib
* Named arguments in commands + many grammar fixes (#20994)metagn2022-12-062-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Breaking parser changes, implement https://github.com/nim-lang/RFCs/issues/442 Types are separated from expressions and better reflected in the grammar. * add test * more accurate grammar * fix keyword typedescs * accept expressions in proc argument lists * CI "fixes" * fixes * allow full ref expressions again, adapt old tests * cleanup, fix some tests * improve grammar, try and revert semtypes change * restrict sigil binding to identOrLiteral * fix, should have caught this immediately * add changelog entry, fix double not nil bug * correct grammar * change section * fix * real fix hopefully * fix test * support LL(1) for tuples * make grammar.txt too
* revert #20719; relieve `std/assertions` of the `sysFatal` dep (#20743)ringabout2022-11-041-4/+5
| | | | | | | * Revert "make `system/fatal` importable (#20718)" This reverts commit d735c447d35948ef6fda8270d1665cbd66c4636a. * relieve `std/assertions` of the sysFatal dep
* fix semcase on tySequence and tyObject #20283 #19682 (#20339)Bung2022-11-011-0/+29
| | | | | | | | | | | | | * fix semcase on tySequence and tyObject #20283 #19682 * use better arg name * avoiding returns nil use errorNode instead, clean code * use efNoDiagnostics flag * remove tests/errmsgs/t19682.nim * combine 2 test cases to one file
* 'lock levels' are deprecated, now a noop (#20539)ringabout2022-10-119-42/+39
| | | | | * 'lock levels' are deprecated, now a noop * fixes tests
* fix #18886 crash on ambiguous proc cast (#20472)Bung2022-10-101-0/+18
| | | | | * fix #18886 crash on ambiguous proc cast * follow suggestion
* add default field support for object in ARC/ORC (#20480)ringabout2022-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fresh start * add cpp target * add result support * add nimPreviewRangeDefault * reduce * use orc * refactor common parts * add tuple support * add testcase for tuple * cleanup; fixes nimsuggest tests * there is something wrong with cpp * remove * add support for seqs * fixes style * addd initial distinct support * remove links * typo * fixes tuple defaults * add rangedefault * add cpp support * fixes one more bugs * add more hasDefaults * fixes ordinal types * add testcase for #16744 * add testcase for #3608 * fixes docgen * small fix * recursive * fixes * cleanup and remove tuple support * fixes nimsuggest * fixes generics procs * refactor * increases timeout * refactor hasDefault * zero default; disable i386 * add tuples back * fixes bugs * fixes tuple * add more tests * fix one more bug regarding tuples * more tests and cleanup * remove messy distinct types which must be initialized by original types * add tests * fixes zero default * fixes grammar * fixes tests * fixes tests * fixes tests * fixes comments * fixes and add testcase * undo default values for results Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* fixes nim check with orc (#20456)ringabout2022-10-021-1/+1
| | | | | | | | | | | * fixes nim check with orc * fixes tests * add tests * fixes tests * Update tests/arc/t20456.nim
* Fix #19224 For loops over a hardcoded empty array crash the compiler (#20476)Bung2022-10-011-0/+12
| | | | | * Fix #11684 For loops over a hardcoded empty array crash the compiler * Update t19224.nim
* fix #2614 improve error message when array of proc calling convention… ↵Bung2022-09-262-9/+33
| | | | | (#20379) fix #2614 improve error message when array of proc calling convention mismatch
* defaults to ORC (#19972)ringabout2022-09-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Improve error message when instantiating generics with object constructor ↵Bung2022-09-211-0/+5
| | | | | | | | | | | | | | | (#20358) * Improve error message when instantiating generics with object constructor * follow suggestion * Update compiler/semobjconstr.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> * Update tests/errmsgs/t19882_2.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* report expression has no type other than has to be used (or discarded… ↵Bung2022-09-201-0/+6
| | | | | (#20392) report expression has no type other than has to be used (or discarded) when typ is tyNone in discardCheck
* fix #19882 Improve error message when instantiating generics that lac… ↵Bung2022-09-191-0/+10
| | | | | | | | | (#20356) * fix #19882 Improve error message when instantiating generics that lack a type * Update tests/errmsgs/t19882.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* minor improvements to follow up recent PRs (#20342)metagn2022-09-142-2/+2
| | | | | | put mOpenArrayToSeq in compile-time evaluation whitelist (it was mNone before which was whitelisted), homogenize "ordinal type expected" errors, put overloadable enums in non-experimental manual
* remove deprecated type pragma syntax, fix bugs that required it (#20199)metagn2022-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
* [Testament] Extend and document message testing aids (#19996)quantimnot2022-09-011-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [Testament] Extend and document message testing aids * Enable inline msgs when not reject action. Eliminates the pain of changing the line and column numbers in `nimout` or `output` while making changes to the test. * Enable using inline msgs and nimout together. Allows ease of inline msgs for the test as well as testing msgs from other modules. * Add path separator and test filename variable interpolation in msgs. Eases handling path separators in the msgs. * Add some documentation. * Fixed lots of broken tests * Fixed more broken tests * Support multiple inline messages per a line * Fix a broken test * Revert variable substitution in `output` * Remove uneeded params * Update doc/testament.md Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> * Update testament/specs.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> * Update testament/specs.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> * Fix indentation Co-authored-by: quantimnot <quantimnot@users.noreply.github.com> Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* remove unused sfProcvar, "procvar" mentions (#20204)metagn2022-08-241-1/+1
| | | refs #12975. doesn't close it because wProcvar isn't removed
* fixes #18983 #5282 #13008; recursive types casue infinite type (#20172)ringabout2022-08-232-0/+12
| | | | | | | * fixes #18983 #5282 #13008; recursive types casue infinite type * re * add testcases
* remove a special case in sigmatch; distinct pointer types no longer match ↵ringabout2022-08-231-0/+23
| | | | | | | | | | | | | | | | `nil` type (#20251) * remove a special case in sigmatch; distinct pointer types no longer match `nil` type * add tests * fixes tests * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Stop type aliases from inheriting sfUsed (#19861)quantimnot2022-06-041-13/+40
| | | | | Fixes #18201 Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* deprecate unsafeAddr; extend addr (#19373)flywind2022-01-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * 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-043-4/+4
| | | | | * style usages (openArray) * revert doc changes
* asynchttpserver: ipv6 support (#18706)Emery Hemingway2021-08-181-1/+1
| | | Fix #18705
* implements overloadable enum values; WIP (#18470)Andreas Rumpf2021-07-281-1/+1
| | | | | * implements overloadable enum values * simpler code
* rename nimFpRoundtrips => nimPreviewFloatRoundtrip (#18566)Timothee Cour2021-07-231-1/+1
|