summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* remove useVersion (#21626)metagn2023-04-082-2/+2
| | | test removing useVersion
* `for` loop expression can now have generated `iterator`'s called (#21627)Jason Beetham2023-04-081-0/+54
| | | A for expression now can have a generated iterator, allowing for more composable iterables
* fixes #21617; createTypeBoundOps with PContext in order to instantiate ↵ringabout2023-04-071-0/+6
| | | | | | | generics (#21619) * fixes #21617; createTypeBoundOps with PContext in order to instantiate generics * keep idgen
* fix #19430 (#21603)metagn2023-04-061-0/+3
|
* warn against `a, b = val` in routine arguments (#21604)metagn2023-04-061-10/+6
| | | closes https://github.com/nim-lang/RFCs/issues/480
* fix #20972 fixes invalid and UB codegen case object transitions for both ↵ringabout2023-04-041-0/+15
| | | | | refc and ORC [backport] (#21611) fix #20972 fixes invalid and UB codegen case object transitions for refc and ORC
* fixes #21564; std/bitops: Add explicit type masking for the JS target (#21598)chmod2222023-04-031-0/+28
| | | | | | | | | | | | | | | | | | | * std/bitops: Add explicit type masking for the JS target Typecasts on the JavaScript backend do not function the same way as they do on C and C++ backends, so for bitwise operations we may need to mask them back down into their allowed range when they get shifted outside it. Since they do work as expected on the other backends, a default bitmask of all 1's is casted down into the target type as an easily optimizable "& 0xFF" operation for these backends. * Fixup: this should still be a func * Run test case on js target * Adapt testcase to contributor guide and best practices * Simplify constrain logic and turn into actual no-op for the C side
* macros: Extend treeTraverse intVal range to nnkUInt64Lit (#21597)chmod2222023-04-011-0/+13
| | | | | | | | | * Extend intVal range to nnkUInt64Lit Fixes #21593 * Properly cast intVal as unsigned * Add testcase for #21593
* fixes #21592; create type bound operations for calls in the method ↵ringabout2023-04-011-0/+11
| | | | | | | dispatcher for ORC (#21594) * fixes #21592; create type operations for the method dispatcher * add a test case
* make --exceptions:quirky work with C++ (#21581)Andreas Rumpf2023-03-311-1/+1
| | | | | * make --exceptions:quirky work with C++ * make tests green again
* hopefully easier to understand error message (#21585)Andreas Rumpf2023-03-301-2/+2
|
* document general use of `_`, error message, fixes (#21584)metagn2023-03-307-5/+37
| | | | | | | | | | | | * document general use of `_`, error message, fixes fixes #20687, fixes #21435 Documentation and changelog updated to clarify new universal behavior of `_`. Also new error message for attempting to use `_`, new tests, and fixes with overloadable symbols and implicit generics. * add test for #21435
* Fix segfault caused by ensuring valueless statics are not evaluated (#21577)Jason Beetham2023-03-291-0/+20
|
* tuple unpacking for vars as just sugar, allowing nesting (#21563)metagn2023-03-286-4/+93
| | | | | | | | | | | | | | | | | | | * tuple unpacking for vars as just sugar, allowing nesting * set temp symbol AST * hopeful fix some issues, add test for #19364 * always use temp for consts * document, fix small issue * fix manual indentation * actually fix manual * use helper proc * don't resem temp tuple assignment
* fixes #20993 [backport:1.6] (#21574)Andreas Rumpf2023-03-281-0/+41
| | | | | * fixes #20993 [backport:1.6] * proper line endings for the test file
* disable google request in thttpclient (#21572)metagn2023-03-281-4/+6
| | | was breaking macos CI
* fixes #21505 (overload resolution of explicit constructors for imported C++ ↵heterodoxic2023-03-271-0/+39
| | | | | types) (#21511) hacky attempt to reconcile default explicit constructors with enforcement of brace initialization, instead of memsetting imported objects to 0
* fixes #14255; Crash in compiler when using `system.any` by accident. (#21562)ringabout2023-03-231-1/+4
| | | fixes #14255; Crash in compiler when using system.any by accident.
* fixes #3770; templates with untyped parameters resolve private fields ↵ringabout2023-03-212-0/+15
| | | | | | | | | wrongly in generics (#21554) * fixes #3770; templates with untyped parameters resolve private fields wrongly * add a test case for #3770 * rename to `nfSkipFieldChecking`
* fixes #21538; expand len template parameter once in newSeqWith (#21543)Eric N. Vander Weele2023-03-201-0/+5
| | | | | | | `len` could contain side effects and may result in different values when substituted twice in the template expansion. Instead, capture the result of substituting `len` once. closes: #21538
* Fix: #21541. Add support for xnVerbatimText (#21542)Mark Leyva2023-03-201-0/+15
| | | | to text and text= procs. Remove unnecessary LF for xnVerbatimText in $ proc.
* Use `analyseIfAddressTaken` logic for checking if address is taken in ↵Jake Leahy2023-03-201-0/+10
| | | | | | | | | | | | | | | | | | | converter (#21533) * Add a test case There are way more test cases (See all branches of analyseIfAddressTaken but this covers at least a second branch * Port analyseIfAddressTaken from semexprs to sigmatch This was done since we cannot import sem or semexprs (circular import) but we need the rest of the logic. In needs to be done here since the converter isn't semmed afterwards and so we can't just leave the process til later use the version from semexprs * Less hacky solution which has the checking be done in analyseIfAddressTakenInCall This was done instead of the recommendation on removing it since sfAddrTaken is used in places other than the backend * Remove weird whitespace * Still check nkHiddenAddr if we are checking a converter
* Made generic type classes work with types using static parameters (#21528)Jason Beetham2023-03-171-0/+30
|
* add a prepass for codeReordering (#21513)ringabout2023-03-174-4/+1
| | | | | | | * add a prepass for codeReordering * simplify * fixes
* fix #18977; disallow change branch of an object variant in ORC (#21526)ringabout2023-03-164-19/+61
| | | | | | | | | | | * fix #18977 disallow change branch of an object variant in ORC * check errors for goto exception * fixes conditions * fixes tests * add a test case for #18977
* fixes #19857; Exception raised in closure may be "skipped" in ORC (#21530)ringabout2023-03-161-0/+39
| | | fixes #19857; Exception raised in closure may be "skipped"
* fixes explicit globals in macros (#21502)ringabout2023-03-121-0/+13
|
* fixes #21496; Ambiguous calls compiles when module name are equal (#21500)ringabout2023-03-123-0/+11
| | | | | * fixes #21496; Ambiguous calls compiles when module name are equal * add a test case
* fixes #21306; fixes #20485; don't transform yields in the var section when ↵ringabout2023-03-101-0/+114
| | | | | | | | | | | introducing new local vars [backport: 1.6] (#21489) * fixes #21306; don't transform yields in the var section when introducing new local vars * adds `inVarSection` so the var section in the var section is freshed * use `isIntroducingNewLocalVars` to avoid yield transformations in var sections * fixes comments
* fixes #21023; Segfault when mixing seqs, orc, variants and futures (#21497)ringabout2023-03-102-0/+93
| | | | | | | | | * fixes #21023; Segfault when mixing seqs, orc, variants and futures * fixes none of the branches were explicitly selected * add one more test * one more test
* fixes quoted variables with typedesc types (#21493)ringabout2023-03-091-0/+8
|
* closes #8295; add a test case (#21486)ringabout2023-03-071-0/+13
|
* closes #6231; add a test case (#21485)ringabout2023-03-071-0/+5
|
* fixes #21377; fixes `@[]` and `{}` type inference as returns in generics ↵ringabout2023-03-061-1/+36
| | | | | | | | | | | | | (#21475) * fixes `@[]` type inference in generics * add issue links * fixes macros and iterators * refactor * add one more test
* closes #20704; add a test case (#21480)ringabout2023-03-061-1/+12
|
* closes #16654; add a test case (#21478)ringabout2023-03-061-0/+12
|
* fixes #21461 (#21463)Arnaud Moura2023-03-031-1/+1
| | | | | * fixes #21461; Move nim-gdb.py and add nim-lldb.py * fixes bad path for nim-gdb.py
* Allow `futureLogging` in release builds (#21448)Jake Leahy2023-03-021-0/+6
| | | | | | | * Add test case * Fixes 21447: Keeps stackTrace around when using futureLogging * Remove extra whitespace
* fixes #20139; hash types based on its path relative to its package path ↵ringabout2023-03-023-0/+18
| | | | | | | | | | | | | | | (#21274) [backport:1.6] * fixes #20139; hash types based on its path relative its project * add a test case * fixes procs * better implementation and test case --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #20422; emit nimPrepareStrMutationV2 for toOpenArray to keep th… ↵Andreas Rumpf2023-03-021-0/+12
| | | | | (#21459) fixes #20422; emit nimPrepareStrMutationV2 for toOpenArray to keep the abstraction of mutable strings which have immutable string literals
* fixes #19291; implements `wasMoved` hook (#21303)ringabout2023-03-025-23/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fixes #19291; implements `wasMoved` hook * basics * checkpoint * finish `wasMoved` * add a test for #19291 * add documentation and changelog * work `attachedWasMoved` with generics * fixes optimizer * register `=wasMoved` * handle wasMoved magcis * check another round * some patches * try `op == nil` * nicer * generate `wasMoved` before `destroy` * try again * fixes tests * default wasMoved * Update tests/destructor/tv2_cast.nim * Update tests/destructor/tv2_cast.nim * Update tests/arc/topt_refcursors.nim
* fixes #21326; fixes #7375; fixes #11986; fixes #9607; rework quote do; ↵ringabout2023-03-021-0/+136
| | | | | | | | | | | | | `getAst` uses type info to annotate the type of quoted variables; no more type erasures for quoted variables (#21433) * fixes #21326; getAst uses type info to annotateType quoted variables * simplify logics; sem types first * fixes important packages * add testcases * tiny
* tests/errmsgs/tcall_with_default_arg.nim: sync (#21237)Anna2023-03-011-1/+1
|
* tests: explicitly enable stack traces where needed (#21236)Anna2023-03-014-18/+21
| | | | | * tests/assert/tassert_c.nim: explicitly enable stack traces * tests/errmsgs: explicitly enable stack traces
* tests/stylecheck: make sure necessary hints are enabled (#21240)Anna2023-03-013-8/+6
|
* fixes #10938; fixes #13312; fixes #13918; fixes #20985; always initializes ↵ringabout2023-03-011-2/+44
| | | | | | | | | | | global variables with null values in VM (#21351) * fixes #10938; always initialize global variable in VM * fixes importc vars * there is a pre-existing issue regarding closure types in the VM * add tests
* fixes #21439; Add tyOpenArray to genTypeInfo. (#21440)Constantine Molchanov2023-02-271-0/+14
| | | | | * fixes #21439; Add tyOpenArray to genTypeInfo. * Add test.
* closes #17864; add a test case (#21434)ringabout2023-02-251-0/+12
|
* fixes #20695; fixes object with distinct defaults and tables (#21428)ringabout2023-02-241-1/+38
|
* fixes #21393 and misc style changes (#21419)Andreas Rumpf2023-02-241-1/+1
| | | | | | | | | * fixes #21393 and misc style changes * progress --------- Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>