November 13, 2008

           Summary: Error using operators from named template mixin
           Product: D
           Version: 1.033
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

template Event() {
        void opCall() { }
        void opAddAssign(int i) { }
class Button {
        mixin Event clicked;
        void func() {
                clicked.opCall(); // works
                this.clicked();   // works

                // Error: function expected before (), not mixin Event!()
clicked; of type void
                // Error: mixin 'Event!()' is not a variable
                clicked += 7;

Tested with DMD v1.033.
A workaround is shown of using "this." before the name of the mixin, but that
could get annoying.