blob: a9d0e9858d0436fda01a4c12e1796f77babc6623 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):
struct ExplicitCtor
{
int x;
int y;
__init(int x)
{
this.x = x;
this.y = 0;
}
// compiler does not synthesize any ctors.
}
void test()
{
// CHECK: error 39999: too many arguments to call (got 2, expected 1)
ExplicitCtor e = {1, 2}; // error, no ctor matches initializer list.
}
|