summary refs log tree commit diff stats
path: root/tests/collections/tsets.nim
Commit message (Expand)AuthorAgeFilesLines
* Merge tests into a larger file (part 1 of ∞) (#9318)Miran2018-10-121-3/+2
* Modify hash for HashSet to use `xor` to mix hash of items.Lolo Iccl2018-05-091-4/+0
* Modify previous commit and add testsLolo Iccl2018-05-091-4/+52
* Added clear() function for OrderedSet and HashSet. (#5545)GrundleTrundle2017-03-161-0/+42
* Fix floats in tuples in HashSetsNycto2015-04-241-14/+34
* moved tsets test to collections/Simon Hafner2014-02-121-0/+17
id=16eb4b1fee14e41807ff5c368ea848b71f258182'>16eb4b1fe ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
           
                                         








                                                                 
 









                                                            
discard """
  errormsg: "type mismatch: got <string>"
  line: 21
  nimout: "twrapconcept.nim(11, 5) Foo: concept predicate failed"
"""

# https://github.com/nim-lang/Nim/issues/5127

type
  Foo = concept foo
    foo.get is int

  FooWrap[F: Foo] = object
    foo: F

proc get(x: int): int = x

proc wrap[F: Foo](foo: F): FooWrap[F] = FooWrap[F](foo: foo)

let x = wrap(12)
let y = wrap "string"