ringabout
2ed16bf2d4
fixes #23139 ; Cannot get repr of range type of enum ( #23164 )
...
fixes #23139
(cherry picked from commit 3dee1a3e4c )
2024-04-19 16:42:27 +02:00
metagn
02be212dae
clean up SOME pending/xxx/issue link comments ( #21826 )
...
* clean up SOME pending/xxx/issue link comments
* great
2023-05-11 10:23:52 +02:00
ringabout
91e4381a20
fixes #20155 ; repr range with distinct types is broken in ORC ( #21682 )
...
fixes #20155 ; repr range with distinct types is broken with ORC
2023-04-17 17:08:53 +02:00
Jason Beetham
a9d0124b5d
Made generic type classes work with types using static parameters ( #21528 )
2023-03-17 10:17:08 +01:00
ringabout
7739e23420
defaults to ORC ( #19972 )
...
* 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 >
2022-09-23 13:05:05 +02:00
Clay Sweetser
8850644cb7
Revert "fixes #20155 ; repr range with distinct types is broken with ORC" ( #20334 )
...
Revert "fixes #20155 ; repr range with distinct types is broken with ORC (#20158 )"
This reverts commit 37b3f62eef .
2022-09-11 16:56:11 -04:00
ringabout
37b3f62eef
fixes #20155 ; repr range with distinct types is broken with ORC ( #20158 )
...
* fixes #20155 ; repr range with distinct types is broken with ORC
* skipRanges
2022-09-11 16:55:22 -04:00
flywind
8bfc396a4d
fixes #18612 ; apply cache and memcmp for methods in arc/orc ( #19749 )
...
* try using endsWith
* use memcmp
* add cache
* cleanup
* better
* minor
* fix
* improve test coverage for methods with ARC
2022-04-26 20:14:39 +02:00
Timothee Cour
e78ef57c93
typetraits: add toSigned, toUnsigned ( #18445 )
...
* typetraits: add toSigned, toUnsigned
* improve and add tests
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: flywind <xzsflywind@gmail.com >
2022-04-07 17:38:01 -04:00
flywind
cb30dc5170
enable tests for #2710 ( #18961 )
2021-10-06 09:42:35 +02:00
Jason Beetham
66e53bdd7b
Fixed type inference for 'set` and 'tuple' ( #18827 )
...
* improved built in typeclass inference
* Smarter logic to fit node
* Forgot the untyped check
2021-09-11 13:05:53 +02:00
Andreas Rumpf
f10eef29b5
fixes #18059 ( #18140 )
...
* fixes #18059
2021-06-02 13:13:23 +02:00
Timothee Cour
e40ff24c23
typeToString: type float => typedesc[float] ( #17011 )
...
* typeToString: type float => typedesc[float]
* fixup
* fix tests
2021-02-12 17:10:20 +01:00
Timothee Cour
1a74576854
distinctBase now is identity instead of error for non distinct types ( #16891 )
2021-02-01 13:10:52 +01:00
Timothee Cour
8f1f0bd1da
typetraits: make genericHead docs reflect reality; use runnableExamples ( #16776 ) [backport:1.4]
2021-01-22 15:06:45 +01:00
flywind
6d442a40a6
use doAssert in tests ( #16486 )
2020-12-28 14:13:21 +01:00
flywind
271f68259b
remove some noises in tests ( #16448 )
2020-12-27 14:45:57 +01:00
Timothee Cour
b809562c7c
make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec ( #16151 )
...
* fix megatest newlines
* still allow missing trailing newline for now but in a more strict way than before
2020-11-28 09:09:31 +01:00
Timothee Cour
b3c3557c33
fix #16025 repr now consistent: does not insert trailing newline ( #16034 )
2020-11-19 12:12:51 -08:00
Ivan Bobev
d03f24147a
Add a macro returning enum items count ( #15824 )
...
Add a macro `enumLen` which is used to determine the number of items in
an enumeration type to the `typetraits.nim` module. Also, add unit tests
for it in the `ttypetraits.nim` module.
Related to nimlang/Nim#15824
2020-11-09 10:02:01 +01:00
Timothee Cour
a6cbe58e8c
typetraits.$: $((int, float), int) is now "((int, float), int)" instead of "(tuple of (int, float), int)" ( #14812 )
...
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2020-07-02 16:19:43 +02:00
alaviss
56b3d422b0
typetraits: features and fixes ( #14791 )
...
* typetraits: add support for nnkTypeOfExpr
* typetraits: don't wrap typedesc symbols in StaticParam
* typetraits: add nested generics support to genericParams
* typetraits: make genericParams understand array[I, T] whackiness
Also moved tests to ttypetraits
* typetraits: clarify comment on genericParams
2020-06-30 15:25:53 +02:00
Timothee Cour
1b41c3122b
fix #13432 typetraits.$: $(int,) is now (int,); $tuple[] is now tuple[] ( #14799 )
...
* typetraits.$: $(int,) is now (int,); $tuple[] is now tuple[]
* changelog
2020-06-29 09:34:05 +02:00
Timothee Cour
0c56eeda0e
expr => untyped; stmt => typed ( #14804 )
...
* expr => untyped; stmt => typed
* changelog + comment
2020-06-25 10:22:08 +02:00
Danil Yarantsev
0327159344
Add test-cases to some fixed issues to close them ( #14795 )
2020-06-24 20:38:08 -07:00
Timothee Cour
3e5743d6f7
add typetraits.elementType ( #14780 )
...
* add typetraits.elementType
* add a test for 0-sized seq
2020-06-24 22:31:07 +02:00
Neelesh Chandola
4c08e64e98
disallow typedesc in arrays & move existing checks to types.typeAllowedAux ( #13261 )
...
* disallow typedesc in arrays and move previous checks to types.typeAllowedAux
2020-05-29 11:48:15 +02:00
Andreas Rumpf
49b28f1997
fixes #14136 ( #14198 )
2020-05-03 00:12:52 +02:00
Jacek Sieka
7d6cbf290a
Error -> Defect for defects ( #13908 )
...
* Error -> Defect for defects
The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.
With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
2020-04-28 19:56:01 +02:00
Jasper Jenkins
ba0af0f827
allow generic typedesc field access ( #12220 )
...
Co-authored-by: Clyybber <darkmine956@gmail.com >
2020-04-20 15:36:57 +02:00
Timothee Cour
10eabec6d4
fix #12864 static params were mutating arg types during sigmatch; fix #12713 ; refs #13529 ( #13976 )
...
* fix #12864 static params were mutating arg types during sigmatch
* fix test
* fix StaticParam
* also fixes #12713 ; added test case
2020-04-14 15:00:02 +02:00
Araq
a102eb5ef6
fixes #13646
2020-03-16 14:55:58 +01:00
Miran
14b2354b7d
rename lenTuple and lenVarargs ( #13639 )
...
* rename 'lenTuple' to 'tupleLen'
Rationale:
`lenTuple` is a tuple consisting of lengths (e.g. `(1, 5, 0)`),
`tupleLen` is a length of a tuple (e.g. `tupleLen((1, 5, 0) == 3`)
* rename 'lenVarargs' to 'varargsLen'
The same rationale as a previous commit. Consistency.
2020-03-12 20:07:02 +01:00
Timothee Cour
b80d293a3f
close #12704 by adding a test (tuple codegen error) ( #13592 )
...
* close #12704 by adding a test
* move test to tests/metatype/ttypedesc2.nim
2020-03-06 08:55:53 +01:00
Timothee Cour
451b724c40
make genericParams support static[T] generic params ( #13433 )
...
* make genericParams support static[T] generic params
* WrapStatic => StaticParam
2020-03-02 18:05:14 +01:00
Timothee Cour
273a93581f
fix incorrect lenTuple implementation ( #13423 )
2020-02-19 11:07:17 +01:00
Timothee Cour
7939319379
fix is with generic types; fix genericHead(Foo[T]) ( #13303 )
...
* fix #9855 , fix #9855 , fix genericHead
* render TTypeKind via toHumanStr
2020-02-09 13:48:55 +01:00
Timothee Cour
1f725f1d7e
miscellaneous bug fixes (part 3) ( #13304 )
...
* fix deprecation; fix indentation
* git clone: use -q
* fix Warning: pragma before generic parameter list is deprecated; fix typo
* bugfix: sysTypeFromName("float64") was never cached
2020-02-07 16:37:40 +01:00
Timothee Cour
7481f43753
fix #13349 regression: isNamedTuple now works with generic tuples ( #13350 )
2020-02-07 06:58:04 +01:00
cooldome
2bf337abae
fixes #13095 ( #13181 )
...
* fixes #13095
* fix typo
2020-01-17 09:17:18 +01:00
Timothee Cour
4cd86c0842
typetraits: fixes #6454 ; genericParams; added lenTuple; added tuple type get ( #13064 )
2020-01-10 08:51:37 +01:00
cooldome
871d5e79b1
distinctBase type trait for distinct types ( #13031 )
2020-01-08 00:36:57 +01:00
Timothee Cour
72499a8d7c
[cleanup] remove disabled (and obsolete) ttypetraits; rename ttypetraits2 => ttypetraits ( #13041 )
...
* remove disabled (and obsolete) ttypetraits; rename ttypetraits2 => ttypetraits
* D20200105T085828 fix super strange bug that causes CI to fail: builds.sr.ht with: `Error: Settle timed out after 120 attempts`
2020-01-05 19:33:33 +01:00
cooldome
0987872675
fixes #12804 ( #12809 )
2019-12-05 07:38:12 +01:00
narimiran
c6a451c584
remove unused imports from tests
2019-11-06 14:35:45 +01:00
Andreas Rumpf
3ba3307d61
remove deprecated procs ( #12535 )
2019-11-05 11:05:46 +01:00
Federico Ceratto
39290cf88c
Fix spellings ( #12277 ) [backport]
2019-09-27 07:02:54 +02:00
Andreas Rumpf
7bc5bf8334
consistent floating point output ( #12219 )
...
* unify float printing
* makes tests green
2019-09-20 10:41:40 +02:00
Timothee Cour
9ae0dd611f
typeToString can now show (recursively) resolved type aliases; fixes #8569 #8083 #8570 ( #11678 )
...
* nested typeToString
* typeToString: preferResolved
* add test
* fix test
* preferMixed
* fix tests
2019-08-31 08:26:45 +02:00
Andreas Rumpf
b044523c5a
fixes 9195 ( #12055 )
2019-08-27 10:07:42 +02:00