Is it supposed to possible to mixin a constructor? The code below
doesn't compile. The error: is "main.d(23): Error: constructor
main.A.this() does not match parameter types (int)
main.d(23): Error: expected 0 arguments, not 1"
template C ()
{
== Quote from Jacob Carlborg (d...@me.com)'s article
> Is it supposed to possible to mixin a constructor? The code below
> doesn't compile. The error: is "main.d(23): Error: constructor
> main.A.this() does not match parameter types (int)
> main.d(23): Error:
Jacob Carlborg wrote:
Is it supposed to possible to mixin a constructor? The code below
doesn't compile. The error: is "main.d(23): Error: constructor
main.A.this() does not match parameter types (int)
main.d(23): Error: expected 0 arguments, not 1"
A template mixin introdu
Hello Jacob,
Is it supposed to possible to mixin a constructor? The code below
doesn't compile. The error: is "main.d(23): Error: constructor
main.A.this() does not match parameter types (int)
main.d(23): Error: expected 0 arguments, not 1"
IIRC mixins can't overload with
On 9/19/09 20:55, Christopher Wright wrote:
Jacob Carlborg wrote:
Is it supposed to possible to mixin a constructor? The code below
doesn't compile. The error: is "main.d(23): Error: constructor
main.A.this() does not match parameter types (int)
main.d(23): Error: expected 0 argume
>> template C ()
>> {
>> this (int i)
>> {
>> }
>> }
>> class A
>> {
>> mixin C;
>> this ()
>> {
>> }
>> }
>> void main ()
>> {
>> auto a = new A(3);
>> }
Since the constructor has no meaning outside classes, should it be
interpreted as a free function if mixed in a non-class context? I really
w
On 2009-09-19 21:17:36 -0400, language_fan said:
Since the constructor has no meaning outside classes, should it be
interpreted as a free function if mixed in a non-class context? I really
wonder how this could be valid code. Does the grammar even support the
3rd line?
Personally, I'd like it
language_fan wrote:
> Since the constructor has no meaning outside classes, should it be
> interpreted as a free function if mixed in a non-class context? I really
> wonder how this could be valid code. Does the grammar even support the
> 3rd line?
Checking whether a constructor is inside a cla
Michel Fortin wrote:
On 2009-09-19 21:17:36 -0400, language_fan said:
Since the constructor has no meaning outside classes, should it be
interpreted as a free function if mixed in a non-class context? I really
wonder how this could be valid code. Does the grammar even support the
3rd line?
P