www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2711] New: -H produces bad headers files if function defintion is templated and have auto return value

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2711

           Summary: -H produces bad headers files if function defintion is
                    templated and have auto return value
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: baryluk smp.if.uj.edu.pl


# cat header.d
auto c(T)(T x) {
        return x;
}
# dmd -c -H header.d
# cat header.di
// D import file generated from 'header.d'
template c(T)
{
 c(T x)
{
return x;
}
}


Currenly std/math.d function abs in phobos have problem.


-- 
Mar 06 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2711





------- Comment #1 from baryluk smp.if.uj.edu.pl  2009-03-06 11:46 -------
Simpler example (without templates):

# cat header2.d
auto c(int x) {
        return 5;
}
# dmd -c -H header2.d
# cat header2.di
// D import file generated from 'header2.d'
 c(int x)
{
return 5;
}


-- 
Mar 06 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2711


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #2 from bugzilla digitalmars.com  2009-04-01 13:48 -------
Fixed DMD 1.042 and 2.027


-- 
Apr 01 2009