2 // REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
3 // POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
5 // https://issues.dlang.org/show_bug.cgi?id=294
12 /** This basic case doesn't work very well. The template signature is
13 * documented twice, but the function signature (argument names and return
14 * type) is not documented at all. This comment is also repeated twice. */
19 /** This comment is also repeated twice, and the second function signature is
20 * not very well documented. */
21 int func2(T
,U
)(T x
, U y
) {}
26 /// Separate overload item.
32 /** This used to work adequately and documented both func3 templates
33 * simultaneously. Now, it documents the first template twice and
34 * no longer documents the function argument and return types.*/
35 int func3(T x
, U y
) {}
39 deprecated template func3(T
, U
=int, V
:long) {
40 private int func3(T x
) {}
76 * blah http://www.map3.com map3
87 * blah http://www.map.com map
90 void map4(string s
)(char rs
)
97 * blah http://www.map.com map
100 template map5(string s
)
111 /** template bodies */
114 /**Attempt one: Doc outside static if.*/
115 static if(is(T
== uint)) {
116 /**Attempt two: Inside.*/
120 /**Attempt two: else.*/
124 /** the abc function should be static */
125 static void abc() { }
130 abstract class Foo8
{ }
132 /// a stray $(RPAREN) mustn't foul the macros
133 void bug4878(string a
= ")") {}
141 this(long ticks
) const pure nothrow { }
145 pure nothrow this(this) { }
149 const pure nothrow ~this() { }
153 void foo(long ticks
) const pure nothrow { }
157 /** Produces something in (a;b] */
158 float f10(float a
, float b
) { return (a
+b
)/2.0; }
159 /** Produces something in [a;b) */
160 float h10(float a
, float b
) { return (a
+b
)/2.0; }
164 void bug6090(string f
="$(B b)", char g
=')')(string h
="$(", string i
="$)") {}
173 this(A
...)(A args
) { }
180 // https://issues.dlang.org/show_bug.cgi?id=14547
189 enum isInt14547(T
) = is(T
== int);
192 enum bool isString14547(T
) = is(T
== string
);
195 static immutable typeName14547(T
) = T
.stringof
;
198 int storageFor14547(T
) = 0;
203 enum int foo14547
= T
.stringof
.length
;
207 template bar14547(T
) if (is(T
== int))
209 enum int bar14547
= T
.stringof
.length
;