Thread overview
[Issue 2646] New: Named mixins and member functions
Feb 05, 2009
d-bugmail
Feb 05, 2009
d-bugmail
May 04, 2012
Denis
February 05, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2646

           Summary: Named mixins and member functions
           Product: D
           Version: 1.039
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: samukha@voliacable.com


Functions inserted into a class using named mixins should be considered separate functions.

template Signal
{
  void connect();
}

class AbstractButton
{
  mixin Signal clicked;
}

class CheckBox : AbstractButton
{
  mixin Signal toggled;
  mixin Signal kicked;
}

CheckBox.toggled.connect shouldn't override AbstractButton.clicked.connect. CheckBox.kicked has nothing to do with AbstractButton.clicked, but currently it causes compilation to fail: "CheckBox.Signal!().connect multiple overrides of same function".


-- 

February 05, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2646





------- Comment #1 from samukha@voliacable.com  2009-02-05 12:05 -------
Another try:

template Signal()
{
  void connect() {};
}

class AbstractButton
{
  mixin Signal clicked;
}

class CheckBox : AbstractButton
{
  mixin Signal toggled;
  mixin Signal kicked;
}


-- 

May 04, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=2646


Denis <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |verylonglogin.reg@gmail.com


--- Comment #2 from Denis <verylonglogin.reg@gmail.com> 2012-05-04 18:37:45 MSD ---
Related NG thread: http://forum.dlang.org/thread/jo0lmj$4dp$1@digitalmars.com

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