December 04, 2005 type inference with variadic ctor bug | ||||
---|---|---|---|---|
| ||||
class Testing { this(int a, ...) { } } auto test = new Testing(1, 2, 3); Results in this error: constructor Testing.this (int,...) does not match argument types (TypeInfo[],int,int). However, this compiles: Testing test = new Testing(1, 2, 3); |
December 04, 2005 Re: type inference with variadic ctor bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C Attachments: | John C schrieb am 2005-12-04: > class Testing { > > this(int a, ...) { } > > } > > auto test = new Testing(1, 2, 3); > > Results in this error: > constructor Testing.this (int,...) does not match argument types > (TypeInfo[],int,int). > > However, this compiles: > > Testing test = new Testing(1, 2, 3); Added to DStress as http://dstress.kuehne.cn/run/v/variadic_argument_11_A.d http://dstress.kuehne.cn/run/v/variadic_argument_11_B.d http://dstress.kuehne.cn/run/v/variadic_argument_11_C.d http://dstress.kuehne.cn/run/v/variadic_argument_11_D.d Thomas |
Copyright © 1999-2021 by the D Language Foundation