summary refs log tree commit diff stats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* import brackets support `as` and prefixes [backport] (#21636)metagn2023-04-181-3/+8
| | | | | | | * import brackets support `as` and prefixes fixes #21635 * copyTree -> copyNode
* actually fix #19015 (#21680)metagn2023-04-171-0/+28
| | | | | | | * actually fix #19015 * more tests * round out
* revert #21227 (#21681)metagn2023-04-172-4/+15
| | | | | | | | | * revert #21227 but keep test * add test for #21677 * don't export * delete test
* warn on set types bigger than max size, default to 0..255 for int literals ↵metagn2023-04-171-0/+10
| | | | | | | | | | | | | | | | | | | (#21659) * test implicitly huge set types refs https://github.com/nim-lang/RFCs/issues/298 * oh my god * boot at least * don't error, fix remaining issues, no 2 len arrays * fix runnable example * test assuming 0..255 for int literal * test refactor, add changelog, test
* fixes #21674; `lent` can be used in the fields or the cast type as a ↵ringabout2023-04-181-0/+16
| | | | | | | | | parameter (#21684) * fixes #21674; `lent` can be used in the fields or the cast type as a parameter * add a test case * fix the test
* fixes #20155; repr range with distinct types is broken in ORC (#21682)ringabout2023-04-171-1/+1
| | | fixes #20155; repr range with distinct types is broken with ORC
* fixes #18146; fixes #19372; disable tlsEmulation on windows; static link ↵ringabout2023-04-142-4/+0
| | | | | | | pthreads with mingw (#21668) * fixes #18146; disable tlsEmulation on windows; static link libwinthreads DLL * whatever
* runnableExamples imports std/assertions by default (#21658)metagn2023-04-141-0/+4
| | | closes https://github.com/nim-lang/RFCs/issues/499
* custom pragmas: correct error condition, remove outdated symkind whitelist ↵metagn2023-04-134-6/+55
| | | | | | | | | | | | | | | (#21653) * test not restricting custom pragma applied symbols fixes #21652 * fix other test * different patch * fix tests * actually test #18212 and other routines
* fixes #20900; Calling template through from generic function across module ↵ringabout2023-04-132-2/+11
| | | | | | | fails to build (#21649) * fixes #20900; Calling template through from generic function across module fails to build * sanother way
* set module symbol type to None instead of nil for discard check (#21657)metagn2023-04-131-0/+15
| | | | | | | * set module symbol type to None instead of nil fixes #19225 * alright
* fixes #21632; enforce deref for `wasMoved` in ORC (#21647)ringabout2023-04-121-1/+10
| | | fixes #21632; enforce deref for `wasMoved`
* int64/uint64 as bigint in JS (#21613)metagn2023-04-1110-40/+59
| | | | | | | | | | | * int64/uint64 as bigint in JS * fix CI * convert to compile option * fix lie * smaller diff, changelog entry
* fix #15691 (#21623)metagn2023-04-111-0/+22
| | | `semProcAux` has a check for `checkMinSonsLen(n, bodyPos + 1)`
* `proc` typeclass accounts for `iterator`, call conventions + `nil` fix + ↵metagn2023-04-112-0/+83
| | | | | | | | | | | | | document typeclass AST (#21629) * test fix #16546 #16548 + another issue * please don't tell me other packages do this * fix CI + test typeclass callconv pragma * better logic in parser * docs and changelog
* Fix option lists with additional indentation in Markdown (#21633)Andrey Makarov2023-04-111-0/+26
| | | | | | | | This is more Markdown-ish way to fix issue #21055, then PR #21625. It does not enable RST definition lists, instead it makes adding additional indentation (less than 4) right after a paragraph be ignored, as it's done for all block elements in Markdown. (In this case this tenet is applied to option lists that are not part of CommonMark spec by themselves).
* fixes #21638; `fromJson` should support empty objects (#21641)ringabout2023-04-111-0/+5
| | | | | * fixes #21638; `fromJson` should supports empty objects * complete the logic
* 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
|