[Issue 2646] Named mixins and member functions

2019-09-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2646

RazvanN  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||razvan.nitu1...@gmail.com
 Resolution|--- |INVALID

--- Comment #3 from RazvanN  ---
Mixin templates are evaluated in the context of the instantiation scope. It
doesn't matter if a name is given to it or not. For example:

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

class CheckBox
{
  mixin Signal toggled;
}

void main()
{
auto a = new CheckBox();
a.connect();
}

This code compiles successfully. You don't have to call `a.toggled.connect`.
This is possible because connect is inserted in the scope of CheckBox (e.g. in
the overload set of that scope level).

Changing this would make mixing functions very difficult to work with.

Closing as invalid.

--


[Issue 2646] Named mixins and member functions

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2646

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

Version|D1  D2 |D2

--


[Issue 2646] Named mixins and member functions

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2646


Denis verylonglogin@gmail.com changed:

   What|Removed |Added

 CC||verylonglogin@gmail.com


--- Comment #2 from Denis verylonglogin@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: ---