Thread overview
[Issue 507] New: Error: 'this' is required, but ... is not a base class of ...
Nov 15, 2006
d-bugmail
Nov 25, 2006
d-bugmail
Dec 03, 2006
d-bugmail
November 15, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=507

           Summary: Error: 'this' is required, but ... is not a base class
                    of ...
           Product: D
           Version: 0.173
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: benoit@tionex.de


module t;
class B {
    public void s() {}
}
class C : B {
    alias B.s s;
    public static void s(int i) {}
    public void s() {}
}

class C2 {
    public void f() {
        C.s(0); // line 17
    }
}
void main() {
}

t.d(17): Error: 'this' is required, but t.C is not a base class of C2


-- 

November 25, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=507





------- Comment #1 from benoit@tionex.de  2006-11-25 07:01 -------
(In reply to comment #0)
I want to add, this is not as much a problem for writing code manually. But
when generating code, it is necessary if the generator does not compare the
signatures for compatibility. Because of that I generate aliases for all
methods that exist in a super class and are redefined in the actual class. The
decision if override or overload applies is by the compiler. This bug blocks
this way of code generation.


-- 

December 03, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=507


deewiant@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #2 from deewiant@gmail.com  2006-12-03 03:52 -------
Fixed in DMD 0.176.


--