[Issue 9176] New: Incorrect gagging of fwdref error in alias this semantics

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 18 03:28:23 PST 2012


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

           Summary: Incorrect gagging of fwdref error in alias this
                    semantics
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-12-18 03:28:21 PST ---
This code prints `false` in compile time. But dmd does not report a forward
reference error in S.get, and compilation itself *wrongly* succeeds.

void foo(int x) {}
pragma(msg, is(typeof(foo(S()))));
struct S {
    auto get() { return get(); }
    alias get this;
}

-- 
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