1+ discard """
2+ targets: "c"
3+ matrix: "--debugger:native --mangle:nim; --debugger:native"
4+ ccodecheck: "'testFunc__titaniummangle95nim_u1316'"
5+ ccodecheck: "'testFunc__titaniummangle95nim_u156'"
6+ ccodecheck: "'testFunc__titaniummangle95nim_u1305'"
7+ ccodecheck: "'testFunc__titaniummangle95nim_u241'"
8+ ccodecheck: "'testFunc__titaniummangle95nim_u1357'"
9+ ccodecheck: "'testFunc__titaniummangle95nim_u292'"
10+ ccodecheck: "'testFunc__titaniummangle95nim_u38'"
11+ ccodecheck: "'testFunc__titaniummangle95nim_u175'"
12+ ccodecheck: "'testFunc__titaniummangle95nim_u1302'"
13+ ccodecheck: "'testFunc__titaniummangle95nim_u1305'"
14+ ccodecheck: "'testFunc__titaniummangle95nim_u535'"
15+ ccodecheck: "'testFunc__titaniummangle95nim_u1294'"
16+ ccodecheck: "'testFunc__titaniummangle95nim_u336'"
17+ ccodecheck: "'testFunc__titaniummangle95nim_u425'"
18+ ccodecheck: "'testFunc__titaniummangle95nim_u308'"
19+ ccodecheck: "'testFunc__titaniummangle95nim_u129'"
20+ ccodecheck: "'testFunc__titaniummangle95nim_u320'"
21+ ccodecheck: "'testFunc__titaniummangle95nim_u223'"
22+ ccodecheck: "'testFunc__titaniummangle95nim_u545'"
23+ ccodecheck: "'testFunc__titaniummangle95nim_u543'"
24+ ccodecheck: "'testFunc__titaniummangle95nim_u895'"
25+ ccodecheck: "'testFunc__titaniummangle95nim_u1104'"
26+ ccodecheck: "'testFunc__titaniummangle95nim_u1155'"
27+ ccodecheck: "'testFunc__titaniummangle95nim_u636'"
28+ ccodecheck: "'testFunc__titaniummangle95nim_u705'"
29+ ccodecheck: "'testFunc__titaniummangle95nim_u800'"
30+ ccodecheck: "'new__titaniummangle95nim_u1320'"
31+ ccodecheck: "'xxx__titaniummangle95nim_u1391'"
32+ ccodecheck: "'xxx__titaniummangle95nim_u1394'"
33+ """
34+
35+ # When debugging this notice that if one check fails, it can be due to any of the above.
36+
37+ type
38+ Comparable = concept x, y
39+ (x < y) is bool
40+
41+ Foo = object
42+ a: int32
43+ b: int32
44+
45+ FooTuple = tuple
46+ a: int
47+ b: int
48+
49+ Container [T] = object
50+ data: T
51+
52+ Container2 [T, T2 ] = object
53+ data: T
54+ data2: T2
55+
56+ Boo = distinct Foo
57+
58+ Coo = Foo
59+
60+ Doo = Boo | Foo
61+
62+ TestProc = proc (a:string ): string
63+
64+ type EnumSample = enum
65+ a, b, c
66+
67+ type EnumAnotherSample = enum
68+ a, b, c
69+
70+ proc testFunc (a: set [EnumSample ]) =
71+ echo $ a
72+
73+ proc testFunc (a: typedesc ) =
74+ echo $ a
75+
76+ proc testFunc (a: ptr Foo ) =
77+ echo repr a
78+
79+ proc testFunc (s: string , a: Coo ) =
80+ echo repr a
81+
82+ proc testFunc (s: int , a: Comparable ) =
83+ echo repr a
84+
85+ proc testFunc (a: TestProc ) =
86+ let b = " "
87+ echo repr a (" " )
88+
89+ proc testFunc (a: ref Foo ) =
90+ echo repr a
91+
92+ proc testFunc (b: Boo ) =
93+ echo repr b
94+
95+ proc testFunc (a: ptr UncheckedArray [int ]) =
96+ echo repr a
97+
98+ proc testFunc (a: ptr int ) =
99+ echo repr a
100+
101+ proc testFunc (a: ptr ptr int ) =
102+ echo repr a
103+
104+ proc testFunc (e: FooTuple , str: cstring ) =
105+ echo e
106+
107+ proc testFunc (e: (float , float )) =
108+ echo e
109+
110+ proc testFunc (e: EnumSample ) =
111+ echo e
112+
113+ proc testFunc (e: var int ) =
114+ echo e
115+
116+ proc testFunc (e: var Foo , a, b: int32 , refFoo: ref Foo ) =
117+ echo e
118+
119+ proc testFunc (xs: Container [int ]) =
120+ let a = 2
121+ echo xs
122+
123+ proc testFunc (xs: Container2 [int32 , int32 ]) =
124+ let a = 2
125+ echo xs
126+
127+ proc testFunc (xs: Container [Container2 [int32 , int32 ]]) =
128+ let a = 2
129+ echo xs
130+
131+ proc testFunc (xs: seq [int ]) =
132+ let a = 2
133+ echo xs
134+
135+ proc testFunc (xs: openArray [string ]) =
136+ let a = 2
137+ echo xs
138+
139+ proc testFunc (xs: array [2 , int ]) =
140+ let a = 2
141+ echo xs
142+
143+ proc testFunc (e: EnumAnotherSample ) =
144+ echo e
145+
146+ proc testFunc (a, b: int ) =
147+ echo " hola"
148+ discard
149+
150+ proc testFunc (a: int , xs: varargs [string ]) =
151+ let a = 10
152+ for x in xs:
153+ echo x
154+
155+ proc xxx (v: static int ) =
156+ echo v
157+
158+ proc testFunc () =
159+ var a = 2
160+ var aPtr = a.addr
161+ var foo = Foo ()
162+ let refFoo : ref Foo = new (Foo )
163+ let b = Foo ().Boo ()
164+ let d: Doo = Foo ()
165+ testFunc (" " , Coo ())
166+ testFunc (1 , )
167+ testFunc (b)
168+ testFunc (EnumAnotherSample )
169+ var t = [1 , 2 ]
170+ let uArr = cast [ptr UncheckedArray [int ]](t.addr )
171+ testFunc (uArr)
172+ testFunc ({})
173+ testFunc (proc (s:string ): string = " test" )
174+ testFunc (20 , a.int32 )
175+ testFunc (20 , 2 )
176+ testFunc (EnumSample .c)
177+ testFunc (EnumAnotherSample .c)
178+ testFunc ((2 , 1 ), " adios" )
179+ testFunc ((22.1 , 1.2 ))
180+ testFunc (a.addr )
181+ testFunc (foo.addr )
182+ testFunc (aPtr.addr )
183+ testFunc (refFoo)
184+ testFunc (foo, 2 , 1 , refFoo)
185+ testFunc (a)
186+ testFunc (@ [2 , 1 , 2 ])
187+ testFunc (@ [" hola" ])
188+ testFunc (2 , " hola" , " adios" )
189+ let arr: array [2 , int ] = [2 , 1 ]
190+ testFunc (arr)
191+ testFunc (Container [int ](data: 10 ))
192+ let c2 = Container2 [int32 , int32 ](data: 10 , data2: 20 )
193+ testFunc (c2)
194+ testFunc (Container [Container2 [int32 , int32 ]](data: c2))
195+ xxx (10 )
196+ xxx (20 )
197+
198+
199+ testFunc ()
0 commit comments