Bug 3047 – Foreach on tuple produces incorrect result (D1 only)

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
All
Creation time
2009-06-02T08:48:54Z
Last change time
2019-09-27T08:34:25Z
Keywords
wrong-code
Assigned to
No Owner
Creator
Sean Kelly

Comments

Comment #0 by sean — 2009-06-02T08:48:54Z
The following code: import std.stdio; import std.traits; void fn(T...)(T fns) { foreach(fn; fns) { writefln( "%s", ParameterTypeTuple!(fn)[0].mangleof ); } } void main() { void a(int x) {} void b(double y) {} void c(Object z) {} fn(&a, &b, &c); } Prints: i i i When the type output should be int, double, Object, respectively.
Comment #1 by clugdbug — 2010-07-16T10:49:22Z
This was fixed in DMD2.047, but not in 1.062.
Comment #2 by razvan.nitu1305 — 2019-09-27T08:34:25Z
D1 is no longer supported, so closing as WONTFIX.