1 module imports.template_ovs2;
2 
3 /***************************************************/
4 // https://issues.dlang.org/show_bug.cgi?id=1900
5 // template overload set
6 
7 auto foo1900a(T)(T arg) if (is(T : const(char)[])) { return 2; }
8 auto foo1900b(int num) { return 1; }
9 
10 auto bar1900a(T)(T arg) if (is(T : const(char)[])) { return 2; }
11 auto bar1900b(T)(T arg) if (is(T : double)) { return 1; }
12 
13 auto baz1900(T)(T arg) if (is(T : Object)) { return 3; }
14 auto baz1900(T)(T arg) if (is(T : const(char)[])) { return 4; }
15 
16 auto bad1900(string op)() if (op == "++") { return 2; }
17 
18 mixin template Mix1900_B()
19 {
20     auto mixfooa(T)(T) { return 2; }
21     auto mixfoob() { return 1; }
22 
23     mixin Mix1900_SubB;
24 }
25 
26 mixin template Mix1900_SubB()
27 {
28     auto mixsubfooa(T)(T) { return 2; }
29     auto mixsubfoob() { return 1; }
30 }
31 
32 auto merge1900(T)(string)
33 {
34     return 2;
35 }
36 
37 /***************************************************/
38 // https://issues.dlang.org/show_bug.cgi?id=1900
39 
40 class BClass1900 {}
41 template Traits1900(T : BClass1900) { enum name = "BClass"; }
42 string func1900(BClass1900 b) { return "BClass"; }
43 
44 void Value1900a() {}
45 template Value1900a(T) if (is(T == string)) { enum Value1900a = 2; }
46 
47 template Value1900b(T) if (is(T == string)) { enum Value1900b = 2; }
48 void Value1900b() {}
49 
50 /***************************************************/
51 // https://issues.dlang.org/show_bug.cgi?id=8352
52 
53 void remove8352a(in char[] name) {}
54 Range remove8352b(alias pred, Range)(Range range) { return range; }
55 
56 /***************************************************/
57 // https://issues.dlang.org/show_bug.cgi?id=10658
58 
59 template Val10658(long n) { enum Val10658 = 2; }