summary refs log tree commit diff stats
path: root/tests/errmsgs
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* make -d:nimFpRoundtrips work consistently in vm vs rt, fix #18400, etc (#18531)Timothee Cour2021-07-201-8/+6
| | | | | | * compiler/vmhooks: add getVar to allow vmops with var params * addFloat vmops with var param * cgen now renders float32 literals in c backend using roundtrip float to string
* make dragonbox opt-in via -d:nimFpRoundtrips (#18504)Andreas Rumpf2021-07-161-6/+8
| | | | | | | * make dragonbox opt-in via -d:nimFpRoundtrips * make tests green again * make tests green again
* improve `--declaredLocs` to help disambiguate types (generics, aliases etc) ↵Timothee Cour2021-07-083-4/+96
| | | | | | | | | (#18389) * improve --declaredlocs to help disambiguate types (generics, aliases etc) * avoid a cyclic deps * fix test after rebase
* Make procedure mismatch more informative with pragma/call convention ↵Jason Beetham2021-07-061-0/+74
| | | | | | | | | | | | | | | | | | mismatches (#18384) * Added more concise calling convention/pragma mismatch messages * Now only adds callConvMsg/lock message when sensible * Fixed message formatting * Added tests, and fixed some bugs * Tests joined, and always indenting * More tests and more bug fixes * Fixed first test in tprocmismatch * Using var param for writting mismatches * Better logic for handling proc type rel and conv/pragma mismatch * Refactored getProcConvMismatch * Fixed callConv message formatting * Fixed test for proper message * Cleanup to address issues * getProcConvMismatch now returns tuple, and reformatted code
* float parsing: Add test for a fixed issue (#18232)Kaushal Modi2021-06-241-11/+18
| | | | | Fixes https://github.com/nim-lang/Nim/issues/14407 . This issue was fixed by https://github.com/nim-lang/Nim/pull/18139.
* fix #18332: XDeclaredButNotUsed hints now in deterministic order (#18336)Timothee Cour2021-06-241-11/+13
|
* fix #18327 (#18328)flywind2021-06-221-0/+5
|
* add test case for pure enum redefinition error within enum (fixed in recent ↵Timothee Cour2021-06-151-7/+14
| | | | | | | | | | | | | PR) (#18266) * add test case for pure enum redefinition error within enum (fixed in recent PR) * remove code duplication * Revert "remove code duplication" (would require bootstrap >= 1.4) This reverts commit 3f793874c231f847ef015e37a5fd6851f85d9675. * fixup
* Small scope refactoring (#18263)Clyybber2021-06-141-0/+12
| | | | | | | * Small scope refactoring * Add test for #10251 * Add inline where appropriate
* followup #17777: declaredloc field error msgs now work with generics (#18259)Timothee Cour2021-06-141-15/+25
| | | | | | | * followup #17777: declaredloc field error msgs now work with generics * fix tests * cleanup
* more informative error msg for undeclared field (`A(badfield: 1)` and ↵Timothee Cour2021-05-161-0/+40
| | | | `a.badfield = expr`) (#17777)
* fix #17859; rename tests so they run in CI; merge several tests with nim ↵Timothee Cour2021-04-277-54/+44
| | | | | | | | | | | | | check (#17862) * rename a test so it runs in CI; merge several tests with nim check * continue * continue * continue * rename tests/errmsgs/undeclared_routine_compiles.nim -> tests/errmsgs/tundeclared_routine_compiles.nim
* fix typo in test name undeclared_routime.nim => undeclared_routine.nim (#17861)Timothee Cour2021-04-267-17/+17
|
* fix CI tests/errmsgs/tgcsafety.nim (#17721)Timothee Cour2021-04-141-1/+1
|
* simplify asyncfutures, asyncmacro (#17633)Timothee Cour2021-04-141-1/+2
|
* close #17636 (#17643)flywind2021-04-065-8/+3
|
* fix #16693: testament spec nimout too lax (#16698)flywind2021-04-042-2/+2
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* fix #14850: `repr` now correctly renders `do` (#17623)Timothee Cour2021-04-031-2/+2
| | | | | | | * fix #14850: `repr` now correctly renders `do` * add tests * fix test
* [nim check]fix #17460 (#17569)flywind2021-03-291-0/+19
|
* fixed dot operator recursive loop & macro suggest (#16922)Saem Ghani2021-02-151-7/+8
| | | | | | | | | | | | | | | | | | * basic stability improvements; refs nimsuggest * fixed dot operator recursive loop & macro suggest * hacky fix for run away dot operator sem check Committing this mostly to make the issue more clear. Perhaps get better feedback. * semExprWithType seems like a better place to check * fixed error messages const case expressions * Clean-up test * stopped the dot operator madness No longer get infinite recursion when seming broken code with a dot operator macro like in jsffi. Co-authored-by: Araq <rumpf_a@web.de>
* typeToString: type float => typedesc[float] (#17011)Timothee Cour2021-02-124-8/+8
| | | | | | | * typeToString: type float => typedesc[float] * fixup * fix tests
* fix floats slice (#16853)flywind2021-01-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | * see whether it breaks * fix * fix * minor * fix * add enum * use Ordinal types * fix tests * fix * another style * fix remainning cases