Bug 4531 – [2.046] No constructors with variable type list

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2010-07-29T08:16:00Z
Last change time
2012-02-09T14:07:28Z
Assigned to
nobody
Creator
joshuareusch

Comments

Comment #0 by joshuareusch — 2010-07-29T08:16:07Z
For example: --- class Output { this(T...)(T msg) { writeln(msg); } } new Output("Hello, ", 42); --- ends in an "Error: no constructor for Output". If you make it as an Exception: --- class MyError : Exception { this(T...)(T msg) { super(text(msg)); } } --- It ends in "Error: constructor test.MyError.this conflicts with template test.MyError.__ctor(T...)". Same with Throwable or Error as base class (probably with all others, too). I have this not tested in other configurations ... Ps: Sorry for bad english :)
Comment #1 by kennytm — 2012-02-09T14:07:28Z
*** This issue has been marked as a duplicate of issue 435 ***