D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4531 - [2.046] No constructors with variable type list
Summary: [2.046] No constructors with variable type list
Status: RESOLVED DUPLICATE of issue 435
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Linux
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-29 08:16 UTC by joshuareusch
Modified: 2012-02-09 14:07 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description joshuareusch 2010-07-29 08:16:07 UTC
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 kennytm 2012-02-09 14:07:28 UTC

*** This issue has been marked as a duplicate of issue 435 ***