summary refs log tree commit diff stats
path: root/compiler/sigmatch.nim
Commit message (Collapse)AuthorAgeFilesLines
* Markdown code blocks migration part 9 (#22506)Amjad Ben Hedhili2023-08-191-1/+1
| | | | | * Markdown code blocks migration part 9 * fix [skip ci]
* unpublic the sons field of PType; the precursor to PType refactorings (#22446)ringabout2023-08-111-10/+9
| | | | | | | | | | | * unpublic the sons field of PType * tiny fixes * fixes an omittance * fixes IC * fixes
* `initNodeTable` and friends now return (#22444)ringabout2023-08-111-2/+2
|
* Fix #5780 (#22428)Bung2023-08-091-1/+1
| | | * fix #5780
* fix #18823 Passing Natural to bitops.BitsRange[T] parameter in generi… ↵Bung2023-08-081-2/+6
| | | | | (#20683) * fix #18823 Passing Natural to bitops.BitsRange[T] parameter in generic proc is compile error
* use strictdefs for compiler (#22365)ringabout2023-08-061-6/+19
| | | | | | | | | | | | | | | * wip; use strictdefs for compiler * checkpoint * complete the chores * more fixes * first phase cleanup * Update compiler/bitsets.nim * cleanup
* fix #20883 Unspecified generic on default value segfaults the compiler (#21172)Bung2023-08-041-0/+5
| | | | | | | | | * 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/+2
| | | | | | | * 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
* Expands codegenDecl to work in function params. fixes #22306 (#22307)Juan M Gómez2023-07-231-1/+1
| | | | | | | * Expands codegenDecl to work in function params. fixes #22306 * makes the test more concrete so T{lit} params dont match * adds sfCodegenDecl
* fixes #22138 (#22221)Andreas Rumpf2023-07-041-2/+7
|
* fix nested call regression in generic bodies (#22189)metagn2023-06-291-0/+11
| | | fixes #22187
* make `var object` match better than `object` (#22152)metagn2023-06-251-1/+3
| | | | | | | | | | | * fix `var object` not matching better than `object` fixes #13302 * remove comment for brevity * try note * try minimize breaks
* fixes #22049; fixes #22054; implicit conversion keeps varness (#22097)ringabout2023-06-161-1/+7
| | | | | | | | | | | | | | | | | | | | | * fixes #22054; codegen for var tuples conv * rethink fixes * add test cases * templates only * fixes var tuples * keep varness no matter what * fixes typ.isNil * make it work for generics * restore isSubrange * add a test case as requested
* fix calls in generic bodies, delay typecheck when no overloads match (#22029)metagn2023-06-131-1/+7
| | | | | | | | | | | | | | | | | | | | | | | * sacrifice "tgenericshardcases" for working statics * legacy switch for CI, maybe experimental later * convert to experimental * apparently untyped needs the experimental switch * try special case call semcheck * try fix * fix compilation * final cleanup, not experimental, make `when` work * remove last needed use of untyped * fix unused warning in test * remove untyped feature
* clean up isNilConversion for seqs, strings (#22057)ringabout2023-06-091-7/+1
|
* make `proc` not implicitly convert to `pointer` with a preview define (#21953)metagn2023-05-301-1/+4
| | | | | | | | | * test `proc` not converting to `pointer` * ignore define for now to test * remove cstring * fixes, changelog
* refactoring in preparation for better, simpler name mangling that wor… ↵Andreas Rumpf2023-04-241-2/+2
| | | | | | | | | | | (#21667) * refactoring in preparation for better, simpler name mangling that works with IC flawlessly * use new disamb field * see if this makes tests green * make tests green again
* fix iterator equality + add test for proc equality + fix sameType (#21707)metagn2023-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * fix iterator equality + add test also for procs fixes #21706 * all targets * and isNil and repr * separate overloads, fix sameType * more restricted sameType? * merge overloads again?? * remove sametype change for now * fix sameType anyway (CI failure was not related) --------- Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* actually fix #19015 (#21680)metagn2023-04-171-1/+3
| | | | | | | * actually fix #19015 * more tests * round out
* revert #21227 (#21681)metagn2023-04-171-6/+2
| | | | | | | | | * revert #21227 but keep test * add test for #21677 * don't export * delete test
* `proc` typeclass accounts for `iterator`, call conventions + `nil` fix + ↵metagn2023-04-111-5/+14
| | | | | | | | | | | | | 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
* remove useVersion (#21626)metagn2023-04-081-1/+1
| | | test removing useVersion
* Use `analyseIfAddressTaken` logic for checking if address is taken in ↵Jake Leahy2023-03-201-2/+1
| | | | | | | | | | | | | | | | | | | 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
* remove nosinks hacks from compiler (#21469)ringabout2023-03-041-1/+1
|
* Specify that address is taken when converter takes a var parameter (#21391)Jake Leahy2023-02-211-0/+1
| | | | | | | * Add test case * closes #21247 Add the sfAddrTaken flag to var parameters in converters This allows the JS backend to properly pass the parameter as a fat pointer
* fix typeRel of typeDesc (#21227)Bung2023-01-091-2/+6
|
* less verbose type mismatch messages (#21191)ringabout2022-12-281-17/+23
| | | | | | | | | * less verbose type mismatch messages * Update compiler/types.nim * fixes i386 * fixes i386
* Fix nimsuggest not suggesting fields in when theres static parameters (#21189)Jake Leahy2022-12-281-1/+1
| | | | | Don't check against empty arguments Add test case
* remove legacy code (#21134)ringabout2022-12-261-2/+0
| | | | | * remove legacy code * fixes
* fix #16541 (#21148)Bung2022-12-221-0/+2
|
* definite assignment analysis for let (#21024)ringabout2022-12-061-2/+5
| | | | | | | | | | | | | | | | | | | * draft for let daa * patch * fixes bugs * errors for global let variable reassignments * checkpoint * out param accepts let * add more tests * add documentation * merge tests
* deprecate `do:` meaning `do ():` + misc cleanup (#20927)metagn2022-12-061-0/+2
| | | | | | | | | | | | | | | | | * 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
* fix #20829 Regression in int64 type matching since (#21019)Bung2022-12-061-2/+4
| | | fix #20829 Regression in int64 type matching
* Revert "fixes #20883; Unspecified generic on default value segfaults the ↵ringabout2022-12-061-2/+1
| | | | | | | compiler" (#21028) Revert "fixes #20883; Unspecified generic on default value segfaults the compiler (#20917)" This reverts commit 10b6e4f5b4a119a8fa42f82a24ae7e4b08b2c103.
* fixes #20883; Unspecified generic on default value segfaults the compiler ↵ringabout2022-12-011-1/+2
| | | | | (#20917) test CI
* tyInt tyUint fit target int bit width (#20829)Bung2022-12-011-19/+28
|
* fix #13790; ptr char (+friends) should not implicitly convert to cstring ↵ringabout2022-11-241-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#20761) * fix =#13790 ptr char (+friends) should not implicitly convert to cstring * Apply suggestions from code review * first round; compiles on windows * nimPreviewSlimSystem * conversion is unsafe, cast needed * fixes more tests * fixes asyncnet * another try another error * last one * true * one more * why bugs didn't show at once * add `nimPreviewCstringConversion` switch * typo Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* fix #19149 Invalid codegen when returning var tuple from a template (#20762)Bung2022-11-061-2/+3
| | | | | * fix #19149 Invalid codegen when returning var tuple from a template * fix type
* fix #19700 Crash when passing a template to a generic functio… (#20567)Bung2022-10-151-0/+2
| | | fix nim-lang#19700 Crash when passing a template to a generic function expecting a procedure
* fix #7446 Generics: type mismatch 'SomeunsignedInt or Natural' (#20522)Bung2022-10-111-2/+1
| | | | | * fix #7446 Generics: type mismatch 'SomeunsignedInt or Natural' * try fix
* DAA and 'out' parameters (#20506)Andreas Rumpf2022-10-061-8/+19
| | | | | | | | | | | * DAA and 'out' parameters * progress * documented strictDefs and out parameters * docs, tests and a bugfix * fixes silly regression
* Markdown code blocks part 6 (#20292)Andrey Makarov2022-08-311-3/+2
|
* remove a special case in sigmatch; distinct pointer types no longer match ↵ringabout2022-08-231-2/+0
| | | | | | | | | | | | | | | | `nil` type (#20251) * remove a special case in sigmatch; distinct pointer types no longer match `nil` type * add tests * fixes tests * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* move assertions out of system (#19599)flywind2022-03-231-0/+3
|
* No longer segfault when using a typeclass with a self referencing type (#19467)Jason Beetham2022-02-021-1/+2
|
* Fixed concept constraints for static types (#19391)Jason Beetham2022-01-151-0/+9
|
* Generic parameters now can constrain statics in type definitions (#19362)Jason Beetham2022-01-141-2/+12
| | | | | | | | | * Parameters now can constrain static in type definitions resolved regression with generic procedures * Update compiler/sigmatch.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #19015 [backport:1.6] (#19204)Andreas Rumpf2021-12-041-1/+2
|
* implements https://github.com/nim-lang/RFCs/issues/407 (#18793)Andreas Rumpf2021-09-031-2/+12
|
* fixes #16325 [backport:1.4] (#18784)Andreas Rumpf2021-09-021-2/+1
|