summary refs log tree commit diff stats
path: root/tests/distinct/tdistinct.nim
Commit message (Collapse)AuthorAgeFilesLines
* Fix distinct requiresInit test and manual (#19901)Khaled Hammouda2022-06-221-3/+3
| | | fix distinct test and manual
* Fixed generic distinct conversions for 'var' (#18837)Jason Beetham2021-10-261-0/+17
| | | | | | | | | | | | | | | * SameTypeAux now properly traverses generic distincts * Smarter traversal of distincts * Removed redundant check * Fixed nkConv for jsgen * Added test for non distinct nkConv * using skiptypes for distinct now * Fixed genaddr for nkconv
* Fix subranges of distinct types (#18816) [backport]Jason Beetham2021-09-071-0/+14
|
* fix #12282 distinct now does not create erroneous copy in VM (#17594)Timothee Cour2021-03-311-0/+32
|
* Make `{.requiresInit.}` to work for distinct types (#15869)Ivan Bobev2020-11-061-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make `requiresInit` pragma to work for distinct types in addition to objects. Tagging of distinct types with `requiresInit` pragma was already supported, but its impact wasn't applied. Now its behavior when applied on distinct types is as follows. Given the following distinct type definitions: ```nim type DistinctObject {.requiresInit, borrow: `.`.} = distinct MyObject DistinctString {.requiresInit.} = distinct string ``` The following code blocks will fail to compile: ```nim var foo: DistinctFoo foo.x = "test" doAssert foo.x == "test" ``` ```nim var s: DistinctString s = "test" doAssert s == "test" ``` But these ones will compile successfully: ```nim let foo = DistinctFoo(Foo(x: "test")) doAssert foo.x == "test" ``` ```nim let s = "test" doAssert s == "test" ```
* fixes #11715 (#11721)Andreas Rumpf2019-07-131-0/+8
|
* fixes #7167 (#11300)Andreas Rumpf2019-05-221-0/+15
| | | | | | * fixes #7167 * spec: distinct types can be ordinal types * bootstrapping issue
* lots of small changesArne Döring2018-12-111-4/+2
|
* fixes #2760Araq2018-10-151-0/+10
|
* Merge tests into a larger file (part 2 of ∞) (#9335)Miran2018-10-131-0/+77
* merge controlflow tests * merge distinct tests * merge enum tests * merge fields tests * merge implicit tests * merge iter issues tests