summaryrefslogtreecommitdiffstats
path: root/tests/initializer-list/struct-visibility-diagnostic-4.slang
blob: 9bc3a76f08f80b49aca28f6c815ed4a65e32d7e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):

public struct Visibility
{
  internal int x = 1;
  public int y = 5;
  // compiler synthesizes:
  // public __init(int y = 0);
}

void test()
{
    //CHECK: error 39999: too many arguments to call (got 2, expected 1)
    Visibility t1 = {1, 2};
}