Bug 683 – dmd segv, this ain't the same as bug 682

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2006-12-12T22:39:00Z
Last change time
2014-02-15T13:19:29Z
Assigned to
bugzilla
Creator
davidl

Comments

Comment #0 by davidl — 2006-12-12T22:39:00Z
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
Comment #1 by davidl — 2006-12-13T01:19:45Z
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)); }
Comment #2 by bugzilla — 2006-12-13T13:48:37Z
I'll fix it, but the ).a( should be replaced with )(, as it is a template function.
Comment #3 by bugzilla — 2006-12-27T02:03:50Z
Fixed DMD 0.178
Comment #4 by thomas-dloop — 2007-02-27T10:47:51Z