summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* fixes #22360; compare with the half of randMax (#22361)ringabout2023-08-021-0/+18
| | | | | * fixes #22360; compare with the half of randMax * add a test
* fixes #22262; fixes `-d:useMalloc` broken with `--mm:none` and `--threads ↵ringabout2023-08-011-1/+2
| | | | | | | on` (#22355) * fixes #22262; -d:useMalloc broken with --mm:none and threads on * fixes
* fixes an issue where byref wasnt properly handled when using it in a generic ↵Juan M Gómez2023-07-291-0/+27
| | | | | | | param (#22337) * fixes an issue where byref wasnt properly handled when using it in a generic param * removes unreachable check
* implement `ensureMove` (#22339)ringabout2023-07-294-0/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * implement `ensureMove` * use an additional flag * improve some logics * progress: fixes discard ensureMove * forbids nested expressions * improve error messages * checkpoint * fixes cursor * ADD MORE TESTS * fixes cursorinference again * tiny cleanup * improve error messages * fixes docs * implement comments add more tests * fixes js
* [JS] Fix bitwise ops & shifts (#22340)konsumlamm2023-07-271-1/+48
| | | | | * [JS] Fix bitwise ops & shifts * Test `int64` & `uint64` only with `jsbigint64`
* [JS] Fix casting to ints (#22327)konsumlamm2023-07-251-0/+21
| | | | | * [JS] Fix casting to ints * Simplify `genCast` by using `asUintN`/`asIntN`
* fixes #22301; fixes #22324; rejects branch initialization with a runtime ↵ringabout2023-07-252-1/+32
| | | | | | | | | | | discriminator with defaults (#22303) * fixes #22301; rejects branch initialization with a runtime discriminator with defaults * undefault nimPreviewRangeDefault * fixes tests * use oldCheckDefault
* Expands codegenDecl to work in function params. fixes #22306 (#22307)Juan M Gómez2023-07-231-0/+17
| | | | | | | * Expands codegenDecl to work in function params. fixes #22306 * makes the test more concrete so T{lit} params dont match * adds sfCodegenDecl
* Testcase for #22008 (#22320)SirOlaf2023-07-231-0/+8
| | | | | Testcase Co-authored-by: SirOlaf <>
* Add test for #22309 (#22316)konsumlamm2023-07-221-0/+11
|
* Fix doc comment rendering for concepts (#22312)konsumlamm2023-07-221-1/+1
|
* fixes #22297; return in the finally in the closure iterators (#22300)ringabout2023-07-221-0/+11
| | | ref #22297; return in the finally in the closure iterators
* fixes CI; disable SSL tests on osx for now (#22304)ringabout2023-07-222-0/+2
| | | | | * test CI * disable osx
* fixes #22210; transform return future in try/finally properly (#22249)ringabout2023-07-212-0/+114
| | | | | | | | | | | * wip; fixes #22210; transform return future in try/finally properly * add a test case for #22210 * minor * inserts a needsCompletion flag * uses copyNimNode
* fixes #22254; fixes #22253; stricteffects bugs on recursive calls (#22294)ringabout2023-07-191-0/+11
|
* fixes #6499; disallow built-in procs used as procvars (#22291)ringabout2023-07-192-4/+6
|
* Fixes Naive virtual crash the compiler fixes #22269 (#22271)Juan M Gómez2023-07-161-0/+4
| | | | | * Fixes Naive virtual crash the compiler fixes #22269 * adds type specific test
* fixes #22256; fixes GC_disableOrc overflow (#22257)ringabout2023-07-111-0/+9
|
* fixes #22237; fixes #21160; wrong cursor on unowned parameters in the for ↵ringabout2023-07-101-0/+55
| | | | | loop in ORC (#22240) fixes #22237; fixes #21160; wrong cursor on unowned parameters
* fixes #22175 (#22229)Andreas Rumpf2023-07-061-0/+12
|
* Fix concepts with doc comments (#22228)Jake Leahy2023-07-061-0/+11
| | | | | | | | | | | | | | | * Add testcase This tries to use a concept with a doc comment which currently leads to a segfault * Ignore nil nodes which happen when there are doc comments in new style concept This was done instead of semming the comments since `semConceptDecl` says it only supports lists of actual statements * Go with alternative fix: Sem comments but ignore them Since `nil` could mean anything it is best to not silently ignore it (In case another nil problem happens in future Also fix test case so it isn't an infinite loop
* fixes #22132; hoisted openArray params result in erroneous code (#22224)ringabout2023-07-051-0/+18
|
* fixes #22138 (#22221)Andreas Rumpf2023-07-041-0/+20
|