Hello,
Say I have some subclasses of Pattern. When I try to write
Pattern[] patterns = [x,y,z];
I get an error because, apparently, D types the array according to the class of
z (Choice is here the type of z):
DeeMatch.d(473): Error: cannot implicitly convert expression (x) of type
Dee
On Sun, 7 Nov 2010 16:17:38 +0100
spir wrote:
And I'd like to know, as a possible workaround, if there is a way to save a
variadic arg list:
class C {
??? xs;
this(X xs...) {
this.xs = xs;
}
}
Denis
-- -- -- -- -- -- --
vit ess
spir Wrote:
> Hello,
>
>
> Say I have some subclasses of Pattern. When I try to write
> Pattern[] patterns = [x,y,z];
> I get an error because, apparently, D types the array according to the class
> of z (Choice is here the type of z):
>
> DeeMatch.d(473): Error: cannot implicitly conver
spir Wrote:
> On Sun, 7 Nov 2010 16:17:38 +0100
> spir wrote:
>
> And I'd like to know, as a possible workaround, if there is a way to save a
> variadic arg list:
> class C {
> ??? xs;
> this(X xs...) {
> this.xs = xs;
> }
> }
>
> Denis
>
On 07.11.2010 18:49, spir wrote:
On Sun, 7 Nov 2010 16:17:38 +0100
spir wrote:
And I'd like to know, as a possible workaround, if there is a way to save a
variadic arg list:
class C {
??? xs;
this(X xs...) {
this.xs = xs;
}
}
On Sun, 07 Nov 2010 20:29:40 +0300
Dmitry Olshansky wrote:
> On 07.11.2010 18:49, spir wrote:
> > On Sun, 7 Nov 2010 16:17:38 +0100
> > spir wrote:
> >
> > And I'd like to know, as a possible workaround, if there is a way to save a
> > variadic arg list:
> > class C {
> > ??? xs;
>
On Sun, 07 Nov 2010 11:24:37 -0500
Jesse Phillips wrote:
> > And I'd like to know, as a possible workaround, if there is a way to save a
> > variadic arg list:
> > class C {
> > ??? xs;
> > this(X xs...) {
> > this.xs = xs;
> > }
> > }
> >
> > Denis
>
spir Wrote:
> No, in fact a variadic param list is not an array -- this is according to
> TDPL an iternal type of the language. Trying to assign it to an X[] var
> throws:
> DeeMatch.d(371): Error: cannot implicitly convert expression (patterns) of
> type DeeMatch.Pattern to Pattern[]
> Well, a
On Sun, 07 Nov 2010 14:08:17 -0500
Jesse Phillips wrote:
> spir Wrote:
>
> > No, in fact a variadic param list is not an array -- this is according to
> > TDPL an iternal type of the language. Trying to assign it to an X[] var
> > throws:
> > DeeMatch.d(371): Error: cannot implicitly convert e
spir wrote:
Hello,
Say I have some subclasses of Pattern. When I try to write
Pattern[] patterns = [x,y,z];
I get an error because, apparently, D types the array according to the class of
z (Choice is here the type of z):
DeeMatch.d(473): Error: cannot implicitly convert expression (x
On 07/11/2010 15:49, spir wrote:
And I'd like to know, as a possible workaround, if there is a way to save a
variadic arg list:
class C {
??? xs;
this(X xs...) {
this.xs = xs;
}
}
What exactly are you trying to do here?
If y
11 matches
Mail list logo