summaryrefslogtreecommitdiffstats
path: root/tests/initializer-list/struct-visibility-diagnostic-3.slang
blob: e36bd4e4ea58d39d5270b23c35cdf8deb12fac5b (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):

public struct NonCStyle
{}
public struct Visibility
{
  internal int x;
  public int[] y; // define a unsized array here on purpose so that the ctor will not associate it with a '{}' initializer
  // will synthesize a constructor
  // __init(int[] y)
}

void test()
{
    //CHECK: error 39999: not enough arguments to call (got 0, expected 1)
    Visibility t1 = {};
}