Debian Codegraph @

gcc/testsuite/gdc.test/compilable/vcg_ast_compilable.d

raw
1 /*
2 REQUIRED_ARGS: -vcg-ast -o-
3 OUTPUT_FILES: compilable/vcg_ast_compilable.d.cg
4 TEST_OUTPUT:
5 ---
6 === compilable/vcg_ast_compilable.d.cg
7 import object;
8 auto binaryFun(E)(E b)
9 {
10 return 'a' == b;
11 }
12 void find(Element)(Element needle) if (is(typeof(binaryFun(needle))))
13 {
14 }
15 void find()(string needle)
16 {
17 }
18 void splitter()
19 {
20 find(3);
21 find("");
22 }
23 binaryFun!int
24 {
25 auto pure nothrow @nogc @safe bool binaryFun(int b)
26 {
27 return 97 == b;
28 }
29
30 }
31 find!int
32 {
33 pure nothrow @nogc @safe void find(int needle)
34 {
35 }
36
37 }
38 binaryFun!string
39 {
40 auto _error_ binaryFun
41 {
42 __error__
43 }
44
45 }
46 find!()
47 {
48 pure nothrow @nogc @safe void find(string needle)
49 {
50 }
51
52 }
53 ---
54 */
55
56 // https://issues.dlang.org/show_bug.cgi?id=24431
57 auto binaryFun(E)(E b)
58 {
59 return 'a' == b;
60 }
61
62 void find(Element)(Element needle) if (is(typeof(binaryFun(needle)))) { }
63 void find()(string needle) { }
64
65 void splitter()
66 {
67 find!int(3);
68 find!()("");
69 }