www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4350] New: (mixin) mixed in template identifier is not accessible by "with" statement

http://d.puremagic.com/issues/show_bug.cgi?id=4350

           Summary: (mixin) mixed in template identifier is not accessible
                    by "with" statement
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: michal.minich gmail.com


--- Comment #0 from Michal Minich <michal.minich gmail.com> 2010-06-19 13:32:14
PDT ---
dmd 2.047

template Bar () { int bar; }

struct Foo {
    int foo;
    mixin Bar mix;
}


void main () {

    Foo f;

    f.foo = 1;
    f.mix.bar = 1;

    with (f) {
        foo = 2;
        mix.bar = 2; // Error: type Foo is not an expression
    }
}

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