digitalmars.D.bugs - [Issue 683] New: dmd segv, this ain't the same as bug 682
- d-bugmail puremagic.com (30/30) Dec 12 2006 http://d.puremagic.com/issues/show_bug.cgi?id=683
- d-bugmail puremagic.com (23/23) Dec 12 2006 http://d.puremagic.com/issues/show_bug.cgi?id=683
- d-bugmail puremagic.com (5/5) Dec 13 2006 http://d.puremagic.com/issues/show_bug.cgi?id=683
- d-bugmail puremagic.com (9/9) Dec 27 2006 http://d.puremagic.com/issues/show_bug.cgi?id=683
- d-bugmail puremagic.com (9/9) Feb 27 2007 http://d.puremagic.com/issues/show_bug.cgi?id=683
http://d.puremagic.com/issues/show_bug.cgi?id=683
Summary: dmd segv, this ain't the same as bug 682
Product: D
Version: 0.177
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: davidl 126.com
import std.stdio;
template a(char[]name, T...){
char[] a(char[]name,T t){
char[] localchar;
foreach(a;T)
{
writefln(`hello`);
localchar~=a.mangleof;
}
return localchar;
}
}
void main()
{
writefln(a!("Adf"[], typeof("adf"),uint).a("Adf"[],"adf",1234));
}
IMHO this should compile & run
--
Dec 12 2006
http://d.puremagic.com/issues/show_bug.cgi?id=683
umm when i posted this bug, i didn't know the string literal as a temp arg very
well.
the following should compile & run .. and at least the compile error message is
not reasonable
import std.stdio;
template a(char[]name, T...){
char[] a(T t){
char[] localchar;
foreach(a;t)
{
writefln(`hello`);
localchar~=typeof(a).mangleof;
}
return localchar;
}
}
void main()
{
writefln(a!("Adf", typeof("adf"),uint).a("adf",1234));
}
--
Dec 12 2006
http://d.puremagic.com/issues/show_bug.cgi?id=683 I'll fix it, but the ).a( should be replaced with )(, as it is a template function. --
Dec 13 2006
http://d.puremagic.com/issues/show_bug.cgi?id=683
bugzilla digitalmars.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Fixed DMD 0.178
--
Dec 27 2006
http://d.puremagic.com/issues/show_bug.cgi?id=683
thomas-dloop kuehne.cn changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version|Windows |All
Added to DStress as
http://dstress.kuehne.cn/run/b/bug_expression_775_A.d
--
Feb 27 2007









d-bugmail puremagic.com 