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

           Summary: Template function declaration with prefixed storage
                    class and auto occurs conflict
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara <k.hara...@gmail.com> 2011-05-08 14:30:40 PDT ---
Following code compilation with -version=Prefix fails, but with -version=Suffix
succeeds.
----
struct S
{
  version(Prefix)
  {
          auto g()(){ return 1; }
    const auto g()(){ return 2; }
  }
  version(Suffix)
  {
    auto g()()      { return 1; }
    auto g()() const{ return 2; }
  }
}
void main()
{
    auto ms = S();
    assert(ms.g() == 1);
    auto cs = const(S)();
    assert(cs.g() == 2);
}
----

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

Reply via email to