annotate compile/o/opCat_26_B.d @ 1407:f1c494dc588a

[Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time John S. Skogtvedt <teleledningsanka@gmail.com> 2007-02-18 http://d.puremagic.com/issues/show_bug.cgi?id=980
author thomask
date Thu, 08 Mar 2007 16:29:23 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1407
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
1 // $HeadURL$
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
2 // $Date$
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
3 // $Author$
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
4
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
5 // @author@ John S. Skogtvedt <teleledningsanka@gmail.com>
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
6 // @date@ 2007-02-18
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=980
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
8 // @desc@ [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
9
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
10 module dstress.compile.o.opCat_26_B;
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
11
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
12 char[] test(){
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
13 char[] s = "a";
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
14 return s ~ "o";
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
15 }
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
16
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
17 const x = test();
f1c494dc588a [Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
thomask
parents:
diff changeset
18 static assert(x == "ao");