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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 19 13:32:18 PDT 2010


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 at puremagic.com
        ReportedBy: michal.minich at gmail.com


--- Comment #0 from Michal Minich <michal.minich at 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: -------


More information about the Digitalmars-d-bugs mailing list