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

           Summary: __traits(getOverloads) returns incorrect symbol
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara <k.hara...@gmail.com> 2012-04-08 09:59:24 PDT ---
Following test should compile.
----
class C
{
  final void ffunc(){}
  final void ffunc(int){}

  void vfunc(){}
  void vfunc(int){}

  abstract void afunc();
  abstract void afunc(int);

  static void sfunc(){}
  static void sfunc(int){}
}

static assert(
  __traits(isFinalFunction, C.ffunc) ==
  __traits(isFinalFunction, __traits(getOverloads, C, "ffunc")[0]));    // NG
static assert(
  __traits(isVirtualFunction, C.vfunc) ==
  __traits(isVirtualFunction, __traits(getOverloads, C, "vfunc")[0]));  // NG
static assert(
  __traits(isVirtualMethod, C.vfunc) ==
  __traits(isVirtualMethod, __traits(getOverloads, C, "vfunc")[0]));    // NG
static assert(
  __traits(isAbstractFunction, C.afunc) ==
  __traits(isAbstractFunction, __traits(getOverloads, C, "afunc")[0])); // OK
static assert(
  __traits(isStaticFunction, C.sfunc) ==
  __traits(isStaticFunction, __traits(getOverloads, C, "sfunc")[0]));   // OK

static assert(__traits(isSame,
  C.ffunc, __traits(getOverloads, C, "ffunc")[0]));    // NG
static assert(__traits(isSame,
  C.vfunc, __traits(getOverloads, C, "vfunc")[0]));    // NG
static assert(__traits(isSame,
  C.afunc, __traits(getOverloads, C, "afunc")[0]));    // NG
static assert(__traits(isSame,
  C.sfunc, __traits(getOverloads, C, "sfunc")[0]));    // NG
----

This issue was caused by fixing bug 7552.

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

Reply via email to