summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/concepts/tusertypeclasses.nim14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/concepts/tusertypeclasses.nim b/tests/concepts/tusertypeclasses.nim
index 533bd528d..3ea10569f 100644
--- a/tests/concepts/tusertypeclasses.nim
+++ b/tests/concepts/tusertypeclasses.nim
@@ -4,6 +4,7 @@ Sortable
 Container
 TObj
 int
+111 111
 '''
 """
 
@@ -25,7 +26,7 @@ type
     C.len is Ordinal
     for v in items(C):
       v.type is tuple|object
-   
+
 proc foo(c: ObjectContainer) =
   echo "Container"
 
@@ -94,6 +95,15 @@ proc to(x: TObj, t: type JSonValue) = discard
 proc testFoo(x: TFoo) =
   echo x.TypeName
   echo x.MappedType.name
-  
+
 testFoo(TObj(x: 10))
 
+# bug #7092
+
+type stringTest = concept x
+  x is string
+
+let usedToFail: stringTest = "111"
+let working: string = "111"
+
+echo usedToFail, " ", working
81b2e751e0388d80896fde7079b1679'>ca4b971bc ^
fe0f10f6b ^
ca4b971bc ^
fe0f10f6b ^
0879f0b0a ^
0879f0b0a ^
1b1bb284d ^
0879f0b0a ^

5263d9d6f ^
93e03144f ^
1b1bb284d ^





2f48dbd16 ^
0879f0b0a ^
180ab350d ^
d20a8ac68 ^
b2e486b23 ^
9af85fb69 ^
1b1bb284d ^
1dd9ec85b ^
f2f16f645 ^






ca4b971bc ^
f2f16f645 ^


f04b502cf ^

9b29436f6 ^
f04b502cf ^

5a4122dc9 ^
809a4a77a ^

e9b665f33 ^

c60bb9464 ^
e9b665f33 ^

f04b502cf ^
1b1bb284d ^
809a4a77a ^

b77ae66e8 ^
93cd98dd1 ^
5263d9d6f ^



035f0fb02 ^
8d2953e80 ^
035f0fb02 ^

8d2953e80 ^
e9b665f33 ^
a5ecbf823 ^


4a720394b ^



88b5dd336 ^
c5c6bae2a ^

e5ae7ceaa ^
6e4cd3e5b ^

e5ae7ceaa ^

1b54be777 ^
567691220 ^

58282547f ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99