[Issue 15866] casting away const from "super" results in "this"

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Apr 3 09:39:36 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=15866

Rainer Schuetze <r.sagitario at gmx.de> changed:

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

--- Comment #1 from Rainer Schuetze <r.sagitario at gmx.de> ---
The spec says: "If a member function is called with an explicit reference to
super, a non-virtual call is made." I guess "explicit" doesn't include being
part of an expression, so this bug report is invalid. The correct call is

   (cast()this).A.foo(b)

We'll have to fix it in druntime/phobos instead.

--


More information about the Digitalmars-d-bugs mailing list