http://d.puremagic.com/issues/show_bug.cgi?id=3047

           Summary: Foreach on tuple produces incorrect result
           Product: D
           Version: 2.030
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzi...@digitalmars.com
        ReportedBy: s...@invisibleduck.org


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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to