November 17, 2004 Order of constant bug? | ||||
---|---|---|---|---|
| ||||
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/
|
November 18, 2004 Re: Order of constant bug? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | 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 > |
Copyright © 1999-2021 by the D Language Foundation