[Issue 873] New: Scope dependant compilation error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 22 17:00:37 PST 2007


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

           Summary: Scope dependant compilation error
           Product: D
           Version: 1.00
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: boris.kolar at globera.com


For struct inside function scope, compilation error occours. For the same
struct outside the scope, no error is reported. Example:

template Factory() {
        Foo foo() {
                return foo.init;
        }
}

struct Foo {
        mixin Factory; // ok
}

void main() {
        struct Foo {
                mixin Factory; // compiler error
        }
}


-- 



More information about the Digitalmars-d-bugs mailing list