[Issue 4960] dmd 2.049 rejects code containing templates with a uint as template parameter

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 30 10:25:08 PDT 2010


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


Austin Hastings <ah08010-d at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ah08010-d at yahoo.com


--- Comment #1 from Austin Hastings <ah08010-d at yahoo.com> 2010-09-30 10:24:52 PDT ---
I get similar behavior on windows. Here is a smaller bit of code that
reproduces the issue (I think):
==========
    class U(uint dim) { }

    void chargecharge_entry(uint dim)( U!(dim) time )
    {
        //pragma(msg, "param: " ~ typeof( time ).mangleof);
    }

    void main() {

        const uint dimension = 1;
        alias U!(dimension) TimeEvolver;

        //pragma(msg, "main: " ~ TimeEvolver.mangleof);

        chargecharge_entry!(dimension)( new TimeEvolver );

    }

==========
For me emits:
test.d(41): Error: cannot implicitly convert expression (new U) of type
test.main.U!(dimension).U to test.U!(dim).U

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


More information about the Digitalmars-d-bugs mailing list