www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 506] New: static import and renamed import of mixin don't work

reply d-bugmail puremagic.com writes:

           Summary: static import and renamed import of mixin don't work
           Product: D
           Version: 0.173
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: wbaxter gmail.com

static import and renamed import of a mixin don't work if the mixin itself has

This is a continuation of 
which covers the basic import case.  The fix for that however does not fix the
static import and renamed import cases (import sigs=std.signals) cases.

Here's examples:

import sigs=std.signals;
class SigObj
    mixin sigs.Signal!();
void main()


static import std.signals;
class SigObj
    mixin std.signals.Signal!();
void main()

Nov 14 2006
parent d-bugmail puremagic.com writes:

bugzilla digitalmars.com changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

------- Comment #1 from bugzilla digitalmars.com  2006-11-26 03:06 -------
mixins are defined to be evaluated in the scope of where they are mixed in,
rather than where they are declared. Hence the behavior you're seeing. To
evaluate it in the context where it is declared, use a struct. It's working as
designed. To change it, please submit an enhancement request.

Nov 26 2006