Hello. Compiling the following code:

mixin template intCtor() { this(int i) {} }
struct Test { mixin intCtor; this(string s) {} }
void main()
{
    auto a = Test("hello");
    auto b = Test(1);
}

...gives the error:

<src>(6): Error: constructor <src>.Test.this (string s) is not callable 
using argument types (int)

What is the problem in calling the mixed-in ctor?

-- 
Shriramana Sharma, Penguin #395953

Reply via email to