Jump to page: 1 2
Thread overview
[Issue 14128] wrong alias
Feb 06, 2015
Vlad Levenfeld
May 24, 2020
Basile-z
May 24, 2020
Basile-z
May 24, 2020
Basile-z
May 24, 2020
Basile-z
[Issue 14128] AliasDeclaration allows expressions, causing false code for ThisExp
May 24, 2020
Basile-z
May 24, 2020
Basile-z
Jun 24, 2020
Dlang Bot
Dec 17, 2022
Iain Buclaw
Nov 25
Dlang Bot
February 06, 2015
https://issues.dlang.org/show_bug.cgi?id=14128

Vlad Levenfeld <vlevenfeld@gmail.com> changed:

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

--
June 09, 2015
https://issues.dlang.org/show_bug.cgi?id=14128

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|D1 & D2                     |D2

--
May 24, 2020
https://issues.dlang.org/show_bug.cgi?id=14128

--- Comment #1 from Basile-z <b2.temp@gmx.com> ---
reduced a bit:

---
struct Foo
{
    int v;
    void test(Foo that) const
    {
        alias a = this.v;
        alias b = that.v;
        assert (&a !is &b);
    }
}

void main ()
{
    Foo a = Foo(1);
    Foo b = Foo(2);
    a.test(b);
}
---

The problem is that `that.v` is an expression and this should not be allowed as alias RHS. The compiler think that the current `this` is also the one required for `that`.

--
May 24, 2020
https://issues.dlang.org/show_bug.cgi?id=14128

Basile-z <b2.temp@gmx.com> changed:

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

--
May 24, 2020
https://issues.dlang.org/show_bug.cgi?id=14128

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
                 CC|                            |b2.temp@gmx.com
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--
May 24, 2020
https://issues.dlang.org/show_bug.cgi?id=14128

Basile-z <b2.temp@gmx.com> changed:

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

--- Comment #2 from Basile-z <b2.temp@gmx.com> ---
*** Issue 19786 has been marked as a duplicate of this issue. ***

--
May 24, 2020
https://issues.dlang.org/show_bug.cgi?id=14128

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|wrong alias                 |AliasDeclaration allows
                   |                            |expressions, causing false
                   |                            |code for ThisExp

--
May 24, 2020
https://issues.dlang.org/show_bug.cgi?id=14128

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code

--
June 24, 2020
https://issues.dlang.org/show_bug.cgi?id=14128

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@NilsLankila updated dlang/dmd pull request #11273 "fix issue 3546 - Support for alias of individual array elements" fixing this issue:

- allow alias of member variables and functions

  by the way, fix issue 14128

https://github.com/dlang/dmd/pull/11273

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=14128

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2

--
« First   ‹ Prev
1 2