blob: 1670860adc371d59ad1dab1a722eabd7aa7125c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):
public struct Visibility
{
internal int x;
public int y = 0;
// will synthesize a constructor
// __init(int y = 0)
}
void test()
{
// CHECK: error 39999: too many arguments to call (got 2, expected 1)
Visibility t1 = {1, 2}; // error, no matching ctor
}
|