Jump to page: 1 2
Thread overview
[Issue 6777] alias this disables casting for classes
[Issue 6777] alias this + cast(void*) == bug
May 17, 2016
Sobirari Muhomori
May 17, 2016
ag0aep6g@gmail.com
Sep 18, 2018
RazvanN
Oct 01, 2018
RazvanN
Oct 06, 2018
Walter Bright
Oct 07, 2018
Walter Bright
Oct 09, 2018
calex
Oct 19, 2018
Walter Bright
Oct 29, 2018
RazvanN
August 29, 2014
https://issues.dlang.org/show_bug.cgi?id=6777

monarchdodra@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=13392

--
May 17, 2016
https://issues.dlang.org/show_bug.cgi?id=6777

Steven Schveighoffer <schveiguy@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy@yahoo.com
           Severity|normal                      |blocker

--- Comment #7 from Steven Schveighoffer <schveiguy@yahoo.com> ---
This effectively disables dynamic casting, as Jakob says. Changing to blocker, this is not a trivial bug to work around.

Came up again recently:

https://forum.dlang.org/post/uoborrimbrlvhkuwmkuq@forum.dlang.org

--
May 17, 2016
https://issues.dlang.org/show_bug.cgi?id=6777

Steven Schveighoffer <schveiguy@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|Other                       |All
                 OS|Windows                     |All

--
May 17, 2016
https://issues.dlang.org/show_bug.cgi?id=6777

Steven Schveighoffer <schveiguy@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|alias this + cast(void*) == |alias this disables casting
                   |bug                         |for classes

--
May 17, 2016
https://issues.dlang.org/show_bug.cgi?id=6777

--- Comment #8 from Sobirari Muhomori <dfj1esp02@sneakemail.com> ---
Workaround:
---
class A { int a; alias a this; }
class B:A { int b; }

int main()
{
    A a = new B;
    //B b = cast(B)a;
    Object obj = a;
    B b = cast(B)obj;
    assert(b.b==0);
    return 0;
}
---

--
May 17, 2016
https://issues.dlang.org/show_bug.cgi?id=6777

Steven Schveighoffer <schveiguy@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra@gmail.com

--- Comment #9 from Steven Schveighoffer <schveiguy@yahoo.com> ---
*** Issue 13392 has been marked as a duplicate of this issue. ***

--
May 17, 2016
https://issues.dlang.org/show_bug.cgi?id=6777

Steven Schveighoffer <schveiguy@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|https://issues.dlang.org/sh |
                   |ow_bug.cgi?id=13392         |

--
May 17, 2016
https://issues.dlang.org/show_bug.cgi?id=6777

ag0aep6g@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0aep6g@gmail.com

--
December 16, 2017
https://issues.dlang.org/show_bug.cgi?id=6777

alexandru.ermicioi@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alexandru.ermicioi@gmail.co
                   |                            |m

--
September 18, 2018
https://issues.dlang.org/show_bug.cgi?id=6777

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #10 from RazvanN <razvan.nitu1305@gmail.com> ---
PR: https://github.com/dlang/dmd/pull/8712

--
« First   ‹ Prev
1 2