summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* fixes #22555; implements `newStringUninit` (#22572)ringabout2023-08-291-0/+11
| | | | | | | | | | | | | * fixes newStringUninitialized; implement `newStringUninitialized` * add a simple test case * adds a changelog * Update lib/system.nim * Apply suggestions from code review rename to newStringUninit
* correct logic for qualified symbol in templates (#22577)metagn2023-08-281-0/+4
| | | | | | | * correct logic for qualified symbol in templates fixes #19865 * add test
* add test case for #19095 (#22566)Bung2023-08-281-0/+35
|
* close #9334 (#22565)Bung2023-08-271-0/+19
|
* fix #22548;environment misses for type reference in iterator access n… ↵Bung2023-08-272-0/+43
| | | | | | | | | | | | | (#22559) * fix #22548;environment misses for type reference in iterator access nested in closure * fix #21737 * Update lambdalifting.nim * remove containsCallKinds * simplify
* test case haul for old generic/template/macro issues (#22564)metagn2023-08-279-34/+248
| | | | | | | | | | | | * test case haul for old generic/template/macro issues closes #12582, closes #19552, closes #2465, closes #4596, closes #15246, closes #12683, closes #7889, closes #4547, closes #12415, closes #2002, closes #1771, closes #5121 The test for #5648 is also moved into its own test from `types/tissues_types` due to not being joinable. * fix template gensym test
* fix generic param substitution in templates (#22535)metagn2023-08-251-0/+80
| | | | | | | * fix generic param substitution in templates fixes #13527, fixes #17240, fixes #6340, fixes #20033, fixes #19576, fixes #19076 * fix bare except in test, test updated packages in CI
* round out tuple unpacking assignment, support underscores (#22537)metagn2023-08-244-6/+18
| | | | | | | | | | | | | | | * 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>
* make jsffi properly gensym (#22539)metagn2023-08-231-0/+6
| | | fixes #21208
* Fix #21532: Check if template return is untyped (#22517)SirOlaf2023-08-231-0/+8
| | | | | | | | | * Don't ignore return in semTemplateDef * Add test --------- Co-authored-by: SirOlaf <>
* allow non-pragma special words as user pragmas (#22526)metagn2023-08-211-0/+5
| | | | | allow non-pragma special words as macro pragmas fixes #22525
* fix getNullValue for cstring in VM, make other VM code aware of nil cstring ↵metagn2023-08-211-0/+31
| | | | | | | | | | | | | (#22527) * fix getNullValue for cstring in VM fixes #22524 * very ugly fixes, but fix #15730 * nil cstring len works, more test lines * fix high
* use old typeinfo generation for hot code reloading (#22518)metagn2023-08-201-0/+1
| | | | | * use old typeinfo generation for hot code reloading * at least test hello world compilation on orc
* replace getOpt with getopt (#22515)Nan Xiao2023-08-196-6/+6
|
* Add staticFileExists and staticDirExists (#22278)Tomohiro2023-08-182-0/+10
|
* make float32 literals stringifying behave in JS the same as in C (#22500)ringabout2023-08-171-3/+2
|
* cascade tyFromExpr in type conversions in generic bodies (#22499)metagn2023-08-171-0/+8
| | | fixes #22490, fixes #22491, adapts #22029 to type conversions
* close #22748; cursorinference + -d:nimNoLentIterators results in err… (#22495)ringabout2023-08-171-0/+46
| | | closed #22748; cursorinference + -d:nimNoLentIterators results in erroneous recursion
* When in object handles procedure call again, fixes #22474 (#22480)Jason Beetham2023-08-151-0/+32
| | | Ping @narimiran please backport to the 2.0 line.
* Markdown code blocks migration part 8 (#22478)Andrey Makarov2023-08-151-2/+2
|
* fixes #22469; generates nimTestErrorFlag for top level statements (#22472)ringabout2023-08-142-0/+20
| | | fixes #22469; generates `nimTestErrorFlag` for top level statements
* relax the parameter of `ensureMove`; allow let statements (#22466)ringabout2023-08-122-2/+3
| | | | | * relax the parameter of `ensureMove`; allow let statements * fixes the test
* close #17045;Compiler crash when a tuple iterator with when nimvm is … ↵Bung2023-08-111-0/+28
| | | | | (#22452) close #17045;Compiler crash when a tuple iterator with when nimvm is iterated in a closure iterator
* close #18103 internal error: inconsistent environment type (#22451)Bung2023-08-111-0/+35
|
* fixes move sideeffects issues [backport] (#22439)ringabout2023-08-101-0/+18
| | | | | | | * fixes move sideeffects issues [backport] * fix openarray * fixes openarray
* adds support for functor in member (#22433)Juan M Gómez2023-08-101-0/+11
| | | | | * adds support for functor in member * improves functor test
* fix #19304 Borrowing std/times.format causes Error: illformed AST (#20659)Bung2023-08-102-3/+27
| | | | | | | | | * fix #19304 Borrowing std/times.format causes Error: illformed AST * follow suggestions * mitigate for #4121 * improve error message
* Fix #21760 (#22422)SirOlaf2023-08-101-0/+8
| | | | | | | | | | | * Remove call-specific replaceTypeVarsN * Run for all call kinds and ignore typedesc * Testcase --------- Co-authored-by: SirOlaf <>
* makes asmnostackframe work with cpp member #22411 (#22429)Juan M Gómez2023-08-091-0/+37
|
* Fix #5780 (#22428)Bung2023-08-091-0/+3
| | | * fix #5780
* fixes cascades of out parameters, which produces wrong ProveInit warnings ↵ringabout2023-08-091-0/+14
| | | | (#22413)
* fix #12938 index type of array in type section without static (#20529)Bung2023-08-092-0/+15
| | | | | | | | | | | | | * fix #12938 nim compiler assertion fail when literal integer is passed as template argument for array size * use new flag tfImplicitStatic * fix * fix #14193 * correct tfUnresolved add condition * clean test
* fixes #22419; async/closure environment does not align local variables (#22425)ringabout2023-08-091-0/+16
| | | | | | | | | | | | | | | | | * fixes #22419; async/closure environment does not align local variables * Apply suggestions from code review * Update tests/align/talign.nim Co-authored-by: Jacek Sieka <arnetheduck@gmail.com> * apply code review * update tests --------- Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
* fix #20891 Illegal capture error of env its self (#22414)Bung2023-08-091-0/+28
| | | | | * fix #20891 Illegal capture error of env its self * fix innerClosure too earlier, make condition shorter
* block ambiguous type conversion dotcalls in generics (#22375)metagn2023-08-094-0/+46
| | | fixes #22373
* fix #18823 Passing Natural to bitops.BitsRange[T] parameter in generi… ↵Bung2023-08-081-0/+6
| | | | | (#20683) * fix #18823 Passing Natural to bitops.BitsRange[T] parameter in generic proc is compile error
* [C++] Member pragma RFC (https://github.com/nim-lang/RFCs/issues/530) (#22272)Juan M Gómez2023-08-071-0/+53
| | | | | | | | | | * [C++] Member pragma RFC #530 rebase devel * changes the test so `echo` is not used before Nim is init * rebase devel * fixes Error: use explicit initialization of X for clarity [Uninit]
* Fix some jsgen bugs (#22330)konsumlamm2023-08-061-9/+27
| | | | | Fix `succ`, `pred` Fix `genRangeChck` for unsigned ints Fix typo in `dec`
* Let inferGenericTypes continue if a param is already bound (#22384)SirOlaf2023-08-061-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Play with typeRel * Temp solution: Fixup call's param types * Test result type with two generic params * Asserts * Tiny cleanup * Skip sink * Ignore proc * Use changeType * Remove conversion * Remove last bits of conversion * Flag --------- Co-authored-by: SirOlaf <>
* fix #15005; [ARC] Global variable declared in a block is destroyed too… ↵Bung2023-08-061-0/+18
| | | | | (#22388) * fix #15005 [ARC] Global variable declared in a block is destroyed too early
* add test for #3907 (#21069)Bung2023-08-061-0/+10
| | | * add test for #3907
* Revert adding generic `V: Ordinal` parameter to `succ`, `pred`, `inc`, `dec` ↵konsumlamm2023-08-061-1/+1
| | | | | | | (#22328) * Use `int` in `digitsutils`, `dragonbox`, `schubfach` * Fix error message
* Fix searchExtPos so that it returns -1 when the path is not a file ext (#22245)Tomohiro2023-08-041-0/+32
| | | | | | | * Fix searchExtPos so that it returns -1 when the path is not a file ext * fix comparision expression * Remove splitDrive from searchExtPos
* fix #20883 Unspecified generic on default value segfaults the compiler (#21172)Bung2023-08-041-0/+12
| | | | | | | | | * fix #20883 Unspecified generic on default value segfaults the compiler * fallback to isGeneric * change to closer error * Update t20883.nim
* Fix crash when using uninstantiated generic (#22379)Jake Leahy2023-08-041-0/+16
| | | | | | | * Add test case * Add in a bounds check when accessing generic types Removes idnex out of bounds exception when comparing a generic that isn't fully instantiated
* Make `repr(HSlice)` always available (#22332)konsumlamm2023-08-041-2/+4
| | | Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* Add experimental inferGenericTypes switch (#22317)SirOlaf2023-08-031-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Infer generic bindings * Simple test * Add t * Allow it to work for templates too * Fix some builds by putting bindings in a template * Fix builtins * Slightly more exotic seq test * Test value-based generics using array * Pass expectedType into buildBindings * Put buildBindings into a proc * Manual entry * Remove leftover ` * Improve language used in the manual * Experimental flag and fix basic constructors * Tiny commend cleanup * Move to experimental manual * Use 'kind' so tuples continue to fail like before * Explicitly disallow tuples * Table test and document tuples * Test type reduction * Disable inferGenericTypes check for CI tests * Remove tuple info in manual * Always reduce types. Testing CI * Fixes * Ignore tyGenericInst * Prevent binding already bound generic params * tyUncheckedArray * Few more types * Update manual and check for flag again * Update tests/generics/treturn_inference.nim * var candidate, remove flag check again for CI * Enable check once more --------- Co-authored-by: SirOlaf <> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Revert "fix #22173 `sink` paramers not moved into closure (refc) (#22… ↵Bung2023-08-031-20/+0
| | | | | | | (#22376) Revert "fix #22173 `sink` paramers not moved into closure (refc) (#22359)" This reverts commit b40da812f7aa590ed16df54a492684c228320549.
* fix #22173 `sink` paramers not moved into closure (refc) (#22359)Bung2023-08-021-0/+20
| | | | | * use genRefAssign when assign to sink string * add test case
* fixes #22362; Compiler crashes with staticBoundsCheck on (#22363)ringabout2023-08-021-0/+13
|