blob: c9ab014b6e6d4b70b45311a5044f70514772803c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/*
TEST_OUTPUT:
---
fail_compilation/ice9284.d(14): Error: template `ice9284.C.__ctor` is not callable using argument types `!()(int)`
fail_compilation/ice9284.d(12): Candidate is: `this()(string)`
fail_compilation/ice9284.d(20): Error: template instance `ice9284.C.__ctor!()` error instantiating
---
*/
class C
{
this()(string)
{
this(10);
// delegating to a constructor which not exists.
}
}
void main()
{
new C("hello");
}
|