slang icon indicating copy to clipboard operation
slang copied to clipboard

[SP004]: Do not initialize a struct without initialize list nor constructor call

Open kaizhangNV opened this issue 5 months ago • 0 comments

As the spec in https://github.com/shader-slang/slang/blob/master/docs/proposals/004-initialization.md we will not initialize a struct without initialize list or constructor call. E.g.

Struct S
{
    int a = 4;
    int b;
};

S s;

In such case, we will not initialize S no matter there are default values for its members.

kaizhangNV avatar Sep 30 '24 15:09 kaizhangNV