digitalmars.D.bugs - Order of constant bug?
- Regan Heath <regan netwin.co.nz> Nov 17 2004
The code below causes the error below, moving the char[] comma line up
above the alias works as expected.
--[strcat.d]--
import std.stdio;
template test(T:T[],alias S) {
char[] foo(T[] a, T[] b) {
return a ~ S ~ b;
}
}
alias test!(char[],comma).foo catComma;
char[] comma = ", ";
void main()
{
char[] a = "Heath";
char[] b = "Regan";
writef(catComma(a,b));
}
D:\D\src\temp>dmd strcat.d
'comma', linkage = 0
Assertion failure: '0' on line 61 in file 'mangle.c'
Regan
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 17 2004
added to DStress as: http://svn.kuehne.cn/dstress/run/bug_mangle_61_A.d http://svn.kuehne.cn/dstress/run/bug_mangle_61_B.d Thomas Regan Heath schrieb am Thu, 18 Nov 2004 11:12:05 +1300:The code below causes the error below, moving the char[] comma line up above the alias works as expected. --[strcat.d]-- import std.stdio; template test(T:T[],alias S) { char[] foo(T[] a, T[] b) { return a ~ S ~ b; } } alias test!(char[],comma).foo catComma; char[] comma = ", "; void main() { char[] a = "Heath"; char[] b = "Regan"; writef(catComma(a,b)); } D:\D\src\temp>dmd strcat.d 'comma', linkage = 0 Assertion failure: '0' on line 61 in file 'mangle.c' Regan
Nov 18 2004








Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn>