[Issue 408] New: Template instance matching doesn't work sometimes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 8 11:39:41 PDT 2006


           Summary: Template instance matching doesn't work sometimes
           Product: D
           Version: 0.169
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: burton-radons at smocky.com

Code fails compilation with:

        argh.d(5): function math.matrix.f!(2u).f (S ) does not match argument
types (S )
        argh.d(5): cannot implicitly convert expression (*this) of type S to S

As far as I can tell it is valid code.

        struct S (uint C)
                void argh ()
                        f! (C) (*this);

        template f (uint C)
                void f (S! (C) a)

        alias S! (2) s;


More information about the Digitalmars-d-bugs mailing list