www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 197] New: mixin mixin repeated twice when error.

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

           Summary: mixin mixin repeated twice when error.
           Product: D
           Version: 0.160
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: huangl tfol.net


the programe :

interface Interface
{
    void Method();
};

template CInterfaceImpl(Host)
{
    void Method()
    {
        printf("hello");
    }
}

class ClassOne : Interface
{
    mixin CInterfaceImpl!(ClassOne, Interface);
};

int main(char[][] argv)
{
    Interface p = new ClassOne;
    p.Method();

    return 0;
}

compile error normally but give a confusing error:

iftest.d(17): mixin mixin CInterfaceImpl!(ClassOne,Interface);
 does not match any template declaration

what's the "mixin mixin"?


-- 
Jun 15 2006
next sibling parent Derek Parnell <derek psych.ward> writes:
On Fri, 16 Jun 2006 01:50:23 +0000 (UTC), d-bugmail puremagic.com wrote:

 http://d.puremagic.com/issues/show_bug.cgi?id=197
 
            Summary: mixin mixin repeated twice when error.
            Product: D
            Version: 0.160
           Platform: PC
         OS/Version: Windows
             Status: NEW
           Severity: trivial
           Priority: P2
          Component: DMD
         AssignedTo: bugzilla digitalmars.com
         ReportedBy: huangl tfol.net
 
 the programe :
 
 interface Interface
 {
     void Method();
 };
 
 template CInterfaceImpl(Host)
 {
     void Method()
     {
         printf("hello");
     }
 }
 
 class ClassOne : Interface
 {
     mixin CInterfaceImpl!(ClassOne, Interface);
 };
 
 int main(char[][] argv)
 {
     Interface p = new ClassOne;
     p.Method();
 
     return 0;
 }
 
 compile error normally but give a confusing error:
 
 iftest.d(17): mixin mixin CInterfaceImpl!(ClassOne,Interface);
  does not match any template declaration
 
 what's the "mixin mixin"?
Poor formatting ;-) The message should read more like ... iftest.d(17): The mixin statement "mixin CInterfaceImpl!(ClassOne,Interface);" does not match any template declaration. -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocrity!" 16/06/2006 11:53:57 AM
Jun 15 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=197


bugzilla digitalmars.com changed:

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





Fixed DMD 0.162


-- 
Jun 30 2006