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