summary refs log tree commit diff stats
path: root/tests/pragmas
Commit message (Collapse)AuthorAgeFilesLines
* fixes #19795; fixes #11852; fixes #19974; remove parsing pipeline, Nim now ↵ringabout2023-02-222-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fixes pragmas reorder (#21205)ringabout2023-01-011-0/+19
|
* Check file exists in `{.compile.}` pragma (#21105)Jake Leahy2022-12-151-0/+5
| | | | | | | | | * Add test * Check file exists before adding it into compilation * Make error message look like other error messages i.e. following the format `error msg: file`
* 'lock levels' are deprecated, now a noop (#20539)ringabout2022-10-111-4/+0
| | | | | * 'lock levels' are deprecated, now a noop * fixes tests
* close #11415; add testcase (#20486)ringabout2022-10-031-0/+25
|
* store full definition AST for consts, fix noRewrite (#20115)metagn2022-09-281-0/+40
| | | | | | | | | | | | | | | | | | | | | | | * continue #9582 for consts, close #9331, fix #20114 also move extractPragma to ast to pave the way for things like {.strdefine: "abc".} etc * changelog correctly * fix jsgen * update tgetimpl * fix sighashes * fix #19766, add comment about postfix * fix noRewrite LOL refs #16620 * fix changelog * fix destructors
* defaults to ORC (#19972)ringabout2022-09-232-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Allow custom pragma on iterators [backport] (#20344)Tanguy2022-09-171-0/+7
| | | Allow custom pragma on iterators
* [Testament] Extend and document message testing aids (#19996)quantimnot2022-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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>
* fixes #18612; apply cache and memcmp for methods in arc/orc (#19749)flywind2022-04-261-0/+3
| | | | | | | | | | | | | | | | | * try using endsWith * use memcmp * add cache * cleanup * better * minor * fix * improve test coverage for methods with ARC
* Clonkk fix2 11923 (#19451)Regis Caillaud2022-02-021-0/+6
| | | | | | | * fix nnkBracketExpr not compiling for getImpl on customPragmaNode * fix test import * fix alias not working with hasCustomPragmas
* New/better macro pragmas, mark some as experimental (#19406)metagn2022-01-202-9/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New/better macro pragmas, make some experimental fix #15920, close #18212, close #14781, close #6696, close https://github.com/nim-lang/RFCs/issues/220 Variable macro pragmas have been changed to only take a unary section node. They can now also be applied in sections with multiple variables, as well as `const` sections. They also accept arguments. Templates now support macro pragmas, mirroring other routine types. Type and variable macro pragmas have been made experimental. Symbols without parentheses instatiating nullary macros or templates has also been documented in the experimental manual. A check for a redefinition error based on the left hand side of variable definitions when using variable macro pragmas was disabled. This nerfs `byaddr` specifically, however this has been documented as a consequence of the experimental features `byaddr` uses. Given how simple these changes are I'm worried if I'm missing something. * accomodate compiler boot * allow weird pragmas * add test for #10994 * remove some control flow, try remove some logic
* Fix #11923 (#19427)Regis Caillaud2022-01-201-0/+10
| | | | | * Apply commit https://github.com/nim-lang/Nim/commit/5da931fe811717a45f2dd272ea6281979c3e8f0b that was never merged (was part of a bigger PR). Should fix issue #11932 * add a generic object for custom pragma
* Accept nnkTypeSection from typedef macro pragmas (#19168)hlaaftana2021-11-221-0/+66
|
* fixes another effect inference bug [backport:1.6] (#19100)Andreas Rumpf2021-11-071-0/+1
| | | | * fixes another effect inference bug [backport:1.6]
* Removes deprecated {.injectStmt.}. Fixes #18666 (#18984)Dominik Picheta2021-10-131-51/+0
|
* 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).