[Issue 216] New: ridiculous error message

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 21 18:16:48 PDT 2006


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

           Summary: ridiculous error message
           Product: D
           Version: 0.161
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: h3r3tic at mat.uni.torun.pl


The code below compiles:

// console_main.d
alias uint DataKey;


struct Output {
        template mix()
        {
                template writei() {
                        void writei(DataKey k) {}
                }

                void write(DataKey k) {
                        writei!()(k);
                }
        }
}


class Kernel {
        // this() {}
}


class Foo : Kernel {
        mixin Output.mix mixer;
}


void main() {
}
// ----

Now, try uncommenting the ctor in the Kernel class.
Result:

console_main.d(8): identifier 'DataKey' is not defined


-- 




More information about the Digitalmars-d-bugs mailing list