Thread overview
[Issue 17055] this(...) hides this() of mixed in template
Jan 02, 2017
Ketmar Dark
Jan 15, 2017
b2.temp@gmx.com
Mar 21, 2020
Basile-z
Sep 17, 2020
Simen Kjaeraas
January 02, 2017
https://issues.dlang.org/show_bug.cgi?id=17055

Ketmar Dark <ketmar@ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--
January 15, 2017
https://issues.dlang.org/show_bug.cgi?id=17055

b2.temp@gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp@gmx.com

--- Comment #1 from b2.temp@gmx.com ---
minimal example ?

--
January 21, 2017
https://issues.dlang.org/show_bug.cgi?id=17055

--- Comment #2 from Ralph Alexander Bariz <ralph.bariz@gmail.com> ---
//////////////////////////////////////////////////////////
mixin template Foo()
{
    int x;

    this()
    {
        this.x=5;
    }
}

class Bar
{
    mixin Foo;

    this(int x)
    {
        this.x=x;
    }
}

void main()
{
    import std.stdio;

    auto a = new Bar();
    writeln(a.x);
}
//////////////////////////////////////////////////////////

leads to
/d994/f417.d(25): Error: constructor f417.Bar.this (int x) is not callable
using argument types ()

--
January 21, 2017
https://issues.dlang.org/show_bug.cgi?id=17055

--- Comment #3 from Ralph Alexander Bariz <ralph.bariz@gmail.com> ---
//////////////////////////////////////////////////////////
mixin template Foo()
{
    int x;

    this()
    {
        this.x=5;
    }
}

class Bar
{
    mixin Foo;
}

void main()
{
    import std.stdio;

    auto a = new Bar();
    writeln(a.x);
}
//////////////////////////////////////////////////////////

is building fine

--
March 21, 2020
https://issues.dlang.org/show_bug.cgi?id=17055

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|b2.temp@gmx.com             |

--
September 17, 2020
https://issues.dlang.org/show_bug.cgi?id=17055

Simen Kjaeraas <simen.kjaras@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |simen.kjaras@gmail.com
         Resolution|---                         |DUPLICATE

--- Comment #4 from Simen Kjaeraas <simen.kjaras@gmail.com> ---


*** This issue has been marked as a duplicate of issue 3332 ***

--