| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
assertion (#23242)
Closes #23240
Fixes regression caused by #23017
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #23200, fixes #18866
#21065 made it so `auto` proc return types remained as `tyAnything` and
not turned to `tyUntyped`. This had the side effect that anything
previously bound to `tyAnything` in the proc type match was then bound
to the proc return type, which is wrong since we don't know the proc
return type even if we know the expected parameter types (`tyUntyped`
also [does not care about its previous bindings in
`typeRel`](https://github.com/nim-lang/Nim/blob/ab4278d2179639f19967431a7aa1be858046f7a7/compiler/sigmatch.nim#L1059-L1061)
maybe for this reason).
Now we mark `tyAnything` return types for routines as `tfRetType` [as
done for other meta return
types](https://github.com/nim-lang/Nim/blob/18b5fb256d4647efa6a64df451d37129d36e96f3/compiler/semtypes.nim#L1451),
and ignore bindings to `tyAnything` + `tfRetType` types in `semtypinst`.
On top of this, we reset the type relation in `paramTypesMatch` only
after creating the instantiation (instead of trusting
`isInferred`/`isInferredConvertible` before creating the instantiation),
using the same mechanism that `isBothMetaConvertible` uses.
This fixes the issues as well as making the disabled t15386_2 test
introduced in #21065 work. As seen in the changes for the other tests,
the error messages give an obscure `proc (a: GenericParam): auto` now,
but it does give the correct error that the overload doesn't match
instead of matching the overload pre-emptively and expecting a specific
return type.
tsugar had to be changed due to #16906, which is the problem where
`void` is not inferred in the case where `result` was never touched.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
statics (#23188)
fixes #23186
As explained in #23186, generics can transform `genericProc[int]` into a
call `` `[]`(genericProc, int) `` which causes a problem when
`genericProc` is resemmed, since it is not a resolved generic proc. `[]`
needs unresolved generic procs since `mArrGet` also handles explicit
generic instantiations, so delay the resolved generic proc check to
`semFinishOperands` which is intentionally not called for `mArrGet`.
The root issue for
[t6137](https://github.com/nim-lang/Nim/blob/devel/tests/generics/t6137.nim)
is also fixed (because this change breaks it otherwise), the compiler
doesn't consider the possibility that an assigned generic param can be
an unresolved static value (note the line `if t.kind == tyStatic: s.ast
= t.n` below the change in sigmatch), now it properly errors that it
couldn't instantiate it as it would for a type param. ~~The change in
semtypinst is just for symmetry with the code above it which also gives
a `cannot instantiate` error, it may or may not be necessary/correct.~~
Now removed, I don't think it was correct.
Still possible that this has unintended consequences.
|
|
|
|
|
| |
efficient than sets and reasonable for holeyenums (#22845)
fixes #22844
|
|
|
|
|
| |
Closes #15351
Stumbled across the issue and found it now works
|
| |
|
|
|
| |
* add test for #3907
|
|
|
|
|
|
|
|
|
| |
* fix #20883 Unspecified generic on default value segfaults the compiler
* fallback to isGeneric
* change to closer error
* Update t20883.nim
|
|
|
|
|
| |
* test CI
* disable osx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* clean up some test categories
* mention exact slice issue
* magics into system
* move trangechecks into overflow
* move tmemory to system
* try fix CI
* try fix CI
* final CI fix
|
|
|
|
|
|
|
| |
* properly disallow unresolved generic proc values
* mirrors semoperand
* shallow efTypeAllowed, add back special case
|
|
|
|
|
| |
(#21954)
fixes fieldDefect loses enum type info in ORC
|
|
|
|
|
| |
* clean up SOME pending/xxx/issue link comments
* great
|
|
|
|
|
|
|
| |
(#21700)
* tweak spellsuggest; three counts for equal distances candidates
* only suggest typos when length > 3
|
|
|
|
|
|
|
| |
* actually fix #19015
* more tests
* round out
|
|
|
|
|
|
|
|
|
|
|
| |
* int64/uint64 as bigint in JS
* fix CI
* convert to compile option
* fix lie
* smaller diff, changelog entry
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
* add a prepass for codeReordering
* simplify
* fixes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
* megatest now checks refc too
* fixes refc
|
|
|
|
|
|
|
|
|
| |
* fix #20253
* change NimbleStableCommit
* Update koch.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Track seen module graphs so symbols from the same module aren't repeated
Add test case
* Track symbols instead of modules
* Don't show duplicate symbols in spell checker
Removes the declared location from the message. Since we don't show duplicates anymore it would be a bit misleading if we only show the location for the first declaration of the symbol
|
| |
|
|
|
|
|
| |
* fixes #19292; fixes 21122; fixes putEnv and setEnv with vcc
* add a test
|
| |
|
|
|
|
|
|
|
|
|
| |
* generic `define` pragma + string alias
* clean
* add tests and document
* remove char/float, minimize changelog
|
|
|
|
|
|
|
|
|
| |
(#21065)
* fix #15836 proc arg return type auto unexpectly match proc with concrete type
* fix #16244
* add test case for #12869
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test disable do: block lambda lifting
* fix last test [skip ci]
* deprecate `do:` meaning `do ():` + misc cleanup
closes https://github.com/nim-lang/RFCs/issues/486
* oops
* fix
* no idea what could be causing nimsuggest failure other than this
* ensure ci works
|
|
|
|
|
| |
* fixes #20914; fixes the align of bug sets
* add a test for alignof
|
|
|
| |
test vcc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test azure
* use exit 1
* try again
* use useSysAssert
* disable i386
* use refc for tlsEmulation on i386
* use refc
* disable i386
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
* add test case
* refactoring transformAddrDeref and fix #18079
* fix jsgen
|
| |
|
|
|
| |
fix #16264 regression(0.18.0 => devel): import times; echo low(Time) gives OverflowDefect
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes nim check with orc
* fixes tests
* add tests
* fixes tests
* Update tests/arc/t20456.nim
|
|
|
|
|
| |
* remove hack for deprecated csize in compiler
* remove test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* system refactor, move out 600 lines
* compilation, slice, backwardsindex, misc_num moved out of system
* some procs/types moved into arithmetics, basic_types
* system no longer depends on syncio
* some procs moved around to fit with their surroundings
* make exceptions an import, old ops to misc_num
* move instantiationInfo back
* move back nim version, fix windows echo
* include compilation
* better docs for imported modules, fix unsigned ops
also remove ze, ze64, toU8, toU16, toU32 with nimPreviewSlimSystem
* fix terminal
* workaround IC test & weird csize bug, changelog
* move NimMajor etc back to compilation, rebase for CI
* try ic fix
* form single `indices`, slim out TaintedString, try fix IC
* fix CI, update changelog, addQuitProc
* fix CI
* try fix CI
* actually fix CI finally hopefully
* Update lib/system/compilation.nim
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* update kochdocs
* hopefully fix csize uses for slimsystem
* fix tquit
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* remove deprecated pragma syntax from 0.20.0
closes #4651, closes #16653 with a cheap fix for now due to
how early `tfFinal` is set
* remove type pragma between name and generics
* undo removal, try removing bind expression (0.8.14)
* fix test, unremove bind expr
* remove again
* Update changelog.md
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* dependencies @ HEAD & weave test dependencies
* try fix package ci
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
|
|
|
| |
This reverts commit 04e4a5ec0e35fc7e1c346c2d002e8487b4b48cb5.
|
|
|
|
| |
* fixes the regressions caused by the fix for #20107 [backport]
|
|
|
|
|
| |
* fix #19600 No error checking on fclose
* add IOError to open
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* remove pre-1.0 stdlib deprecations
notable exceptions:
* ze, toU8 etc in system/arithmetics
* potentially callsite
* undo macros, ospaths, securehash, oswalkdir
* add sets back
* add back future, document deprecated versions
* add to changelog [skip ci]
|
|
|
| |
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
| |
fixes #20162; locals doesn't work with ORC
|