yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

kaizhangNVImplement default initializer list for C-Style type member (#7079)3072cfea9

master
415 B19 linesraw
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):
2
3public struct NonCStyle
4{}
5public struct Visibility
6{
7  internal int x;
8  public int[] y; // define a unsized array here on purpose so that the ctor will not associate it with a '{}' initializer
9  // will synthesize a constructor
10  // __init(int[] y)
11}
12
13void test()
14{
15    //CHECK: error 39999: not enough arguments to call (got 0, expected 1)
16    Visibility t1 = {};
17}
18
19