summary refs log tree commit diff stats
path: root/tests/pragmas
Commit message (Collapse)AuthorAgeFilesLines
* strict effects (#18777)Andreas Rumpf2021-09-021-1/+2
| | | | | | | | | | | | | | | | | * fixes #17369 * megatest is green for --cpu:arm64 * docgen output includes more tags/raises * implemented 'effectsOf' * algorithm.nim: uses new effectsOf annotation * closes #18376 * closes #17475 * closes #13905 * allow effectsOf: [a, b] * added a test case * parameters that are not ours cannot be declared as .effectsOf * documentation * manual: added the 'sort' example * bootstrap with the new better options
* improvements to `addInt` and `$` for integer types (#18592)Timothee Cour2021-08-191-5/+8
| | | | | | | | * improvements to $(SomeInteger) and addInt * remove mIntToStr, mInt64ToStr * improvements * fix tests/pragmas/tinjectstmt.nim; the diff is harmless, cgen code is identical with -d:danger or debug mode * rm tests/system/tstrmantle.nim * revert compiler/jsgen.nim for -d:nimVersion140
* fix: `var a{.foo.} = expr` inside templates (refs #15920) (except when `foo` ↵Timothee Cour2021-08-111-0/+52
| | | | | | | | | | | is overloaded) (#13869) * fix: `var a{.foo.} = expr` inside templates * add test * improve tdecls test * improve tests * add failing test * PRTEMP * fixup
* fixes #18543 (#18601)Andreas Rumpf2021-07-271-12/+13
| | | | | * fixes #18543 * make tests green again
* followup #18362: make `UnusedImport` work robustly (#18366)Timothee Cour2021-06-273-0/+129
| | | | * warnDuplicateModuleImport => hintDuplicateModuleImport * improve DuplicateModuleImport msg, add test
* even lighter version of #17938: fix most issues with UnusedImport, ↵Timothee Cour2021-06-264-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XDeclaredButNotUsed, etc; fix #17511, #17510, #14246 (without realModule) (#18362) * {.used: symbol} * add tests * fix tests with --import * --import works without giving spurious unused warnings * new warning warnDuplicateModuleImport for `import foo; import foo` * fix test, add resolveModuleAlias, use proper line info for module aliases * fix spurious warnings * fix deprecation msg for deprecated modules even with `import foo as bar` * disable a test for i386 pending sorting XDeclaredButNotUsed errors * UnusedImport now works with re-exported symbols * fix typo [skip ci] * ic support * add genPNode to allow writing PNode-based compiler code similarly to `genAst` * fix DuplicateModuleImport warning * adjust test * fixup * fixup * fixup * fix after rebase * fix for IC * keep the proc inline, move the const out * [skip ci] fix changelog * experiment: remove calls to resolveModuleAlias * followup * fixup * fix tests/modules/tselfimport.nim * workaround tests/deprecated/tmodule1.nim * fix properly * simplify
* move {.injectStmt.} to experimental; add a test (#18300)Timothee Cour2021-06-201-0/+48
| | | | | * move {.injectStmt.} to experimental; add a test * undocument and deprecat `.injectStmt` but keep its implementation until we have a replacement
* change `--hint[X] => --hint:X` in nim repo (avoids shell quoting issues) ↵Timothee Cour2021-05-261-1/+1
| | | | (#18085)
* getCustomPragmaVal priority/override fixes (#17725)Clyybber2021-04-211-0/+10
| | | | | | | | | * Adhere left-to-right rule for custom pragma priority * Improve error message for no custom pragmas * custom pragmas on var/let sym take priority over its type ones * Workaround & bug
* Fix getCustomPragmaVal for some multi arg pragmas (#17723)Clyybber2021-04-151-0/+9
| | | | | * Fix getCustomPragmaVal for some multi arg pragmas * Bootstrap fix
* simplify asyncfutures, asyncmacro (#17633)Timothee Cour2021-04-141-13/+7
|
* getCustomPragma is split up in more usable chunks (#11526)Arne Döring2021-04-141-3/+27
| | | | | | | | | | | | | | | | | * getCustomPragma is split up in more usable chunks * changelog entry * fix for style checks * shitty typedesc special casing * Add since annotation and remove typedesc comments * Fix typo * Revert since annotation because it breaks bootstrapping * Export getCustomPragmaNode conditionally * Reduce code duplication * Update since * Update lib/core/macros.nim * Apply suggestions from code review Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #16693: testament spec nimout too lax (#16698)flywind2021-04-042-2/+18
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* disable hint:processing in tests (#16713)Timothee Cour2021-01-141-0/+1
| | | | | * disable hint:processing in tests * fix test
* use doAssert in tests (#16486)flywind2020-12-282-35/+35
|
* fix #12558 (#15864)flywind2020-11-091-0/+15
| | | | * fix #12558 * Update compiler/pragmas.nim
* close #8457 (#15844)flywind2020-11-051-0/+11
|
* fix #12640 (#15829)flywind2020-11-031-0/+25
|
* implements https://github.com/nim-lang/RFCs/issues/260 (#15505)Andreas Rumpf2020-10-072-0/+13
| | | | | * implements https://github.com/nim-lang/RFCs/issues/260 * added a test case
* Add test-cases for #12576 and #12523 (#15085)Danil Yarantsev2020-07-271-2/+23
| | | | | * Add a test-case for #12576 * Add a test-case for #12523
* add test for `define`, `undef` (#14443)Timothee Cour2020-05-251-0/+12
|
* change the [Processing] messages into dots (#14418)Andreas Rumpf2020-05-211-2/+1
| | | | | | | * change the [Processing] messages into dots * better implementation * maybe I should work on something else...
* fix #13909 (#13914) [backport:1.2]cooldome2020-04-081-0/+11
| | | Co-authored-by: cooldome <ariabushenko@bk.ru>
* macros for proc types, macros for types (#13778)Andreas Rumpf2020-03-311-1/+87
| | | | | | | | | * new minor feature: macros for proc types, to be documented * Finished the implementation and added tests * [skip ci] Describe the new custom pragmas in the manual and the changelog Co-authored-by: Zahary Karadjov <zahary@gmail.com>
* fix operators containing percent for VM usage (#13536)Arne Döring2020-03-111-1/+1
| | | | * fixes #13513 * merge tarithmetics in tarithm
* Add sideEffect pragma to importC procs in posix, winlean and time module ↵Tomohiro2020-02-081-0/+10
| | | | | | | | | (#13370) * Add sideEffect pragma to procs in winlean * Add sideEffect pragma to procs in posix * Add test for #13306 * Add sideEffect pragma to procs in times * Fixes #13306
* fixes #5050; fixes #11826 (#12606) [backport]cooldome2019-11-072-0/+24
|
* ungeneric unsigned ops (#12230)Jasper Jenkins2019-10-111-1/+2
| | | | | | | | | | * ungenericise unsigned ops, remove nimNewShiftOps * fix/remove tests * update t6448 * fix line info * disable on 32bit * fix different line info * add changelog entry
* fixes #12171 (#12173)Andreas Rumpf2019-09-111-2/+21
|
* revert changesAndrii Riabushenko2019-07-252-24/+0
|
* add testAndrii Riabushenko2019-07-252-0/+24
|
* Fix astdef typ deref (#10245)Alexander Ivanov2019-04-051-2/+11
|
* add tests for recently closed issues (#10722)Miran2019-02-231-0/+10
|
* Prevent crash on pragma templates w/ generics (#10685)LemonBoy2019-02-181-0/+7
| | | | | | | | | * Prevent crash on pragma templates w/ generics * Remove incorrect call to pragma reconversion `semOverloadedCall` may return a node with more elements than the original nkCall node had (implicit and/or explicit generics).
* Misc macro things (#10612)LemonBoy2019-02-091-1/+1
| | | | | | | | | | | | * Misc cleanup in macro code Generate error messages using `error` instead of `assert`. Fixes #10574 * Fix crash with hasCustomPragma on quoted fields Use the `$` operator instead of reaching for the `strVal` field directly
* Fix getCustomPragmaVal on `var` fieldsLemonBoy2019-02-061-0/+5
|
* Fixed getCustomPragmaVal to allow multiple fields in custom annotations (#10289)Ico Doornekamp2019-01-181-0/+9
|
* add custom pragma support for var and let symbols (#9582)jcosborn2019-01-071-6/+29
| | | | | | * add custom pragma support for var and let symbols * updated changelog for custom pragmas on var and let symbols * add oldast switch for backwards compatibility
* exportc is now not allowed for type aliases (#9979)Neelesh Chandola2019-01-021-0/+12
|
* fixes #10101 (#10103)Timothee Cour2018-12-271-1/+1
|
* Merge pull request #9937 from cooldome/pragmablock_custom_pragmaAndreas Rumpf2018-12-121-0/+22
|\ | | | | Language feature: implement custom pragmas in pragma blocks
| * add testAndrii Riabushenko2018-12-111-0/+22
| |
* | make tests green; better output for when megatest execution failsAraq2018-12-111-1/+1
| |
* | testament: joinable is now an explicit concept of a test specAndreas Rumpf2018-12-111-0/+2
| |
* | require errormsg to be specified before file.Arne Döring2018-12-113-4/+4
|/
* add comment, fixes #9896Andrii Riabushenko2018-12-081-0/+1
|
* Fix hintXDeclaredButNotUsed for enum fields marked as usedAndrii Riabushenko2018-12-081-0/+5
|
* make run the default action of a test in testerArne Döring2018-11-231-0/+1
|
* Fix overload resolution for pragmas evaluation (#8902)LemonBoy2018-10-093-0/+22
| | | | Fixes #6448 Fixes #4384
* make tests green againAndreas Rumpf2018-09-242-5/+5
|