Debian Codegraph @

tests/dmd/fail_compilation/imports/ice10600b.d

raw
1 module imports.ice10600b;
2
3 import imports.ice10600a;
4
5 template to(T)
6 {
7 T to(A...)(A args)
8 {
9 return toImpl!T(args);
10 }
11 }
12
13
14 T toImpl(T, S)(S value)
15 if (is(S : T))
16 {
17 return value;
18 }
19
20
21 T toImpl(T, S)(S value)
22 if (!is(S : T) &&
23 is(T == string))
24 {
25 auto w = appender!T();
26 //Appender!T w;
27 return null;
28 }
29
30 T toImpl(T, S)(S value)
31 if ( is(S == string) &&
32 !is(T == string) && is(typeof(to!string(value[0])))
33 )
34 {
35 return T.init;
36 }