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

           Summary: Non-int integral template parameters not correctly
                    propagated
           Product: D
           Version: 2.035
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: simen.kja...@gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kja...@gmail.com> 2009-11-02 02:56:38 
PST ---
The below code snippet fails to compile on DMD 2.035:

Error: cannot implicitly convert expression (baz.barof type foo!(n) to foo!(4)

Now change uint to int, and everything works perfectly. This might have to do
with literal types ( 4 is an int, not a uint, ulong, byte, or whatever ).

struct foo( uint n ) {
    foo!( n ) bar( ) {
        typeof( return ) result;
        return result;
    }
}

void main( ) {
    foo!( 4 ) baz;
    baz = baz.bar;// FAIL
}

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

Reply via email to