blob: ea3acb2c75e51f82e4df56c15219b90b07cffffb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//DISABLE_DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):
struct PartialInit
{
int x = 1;
int y;
// compiler synthesizes:
// __init(int x, int y);
}
void test()
{
// TODO: Because we have a legacy logic that will always convert the one arugment ctor call to
// initializer list, and that initializer list will fall back to the legacy C-Style initialization.
// We need to remove that logic.
// CHECK: error 33070: expected a function, got 'typeof(PartialInit)'
PartialInit p = PartialInit(2); // error, no ctor match.
}
|