diff options
Diffstat (limited to 'tests/bugs/static-const-init-expr-with-interface-2.slang')
| -rw-r--r-- | tests/bugs/static-const-init-expr-with-interface-2.slang | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/bugs/static-const-init-expr-with-interface-2.slang b/tests/bugs/static-const-init-expr-with-interface-2.slang new file mode 100644 index 000000000..6976f1303 --- /dev/null +++ b/tests/bugs/static-const-init-expr-with-interface-2.slang @@ -0,0 +1,15 @@ +//TEST:SIMPLE(filecheck=CHECK): -stage compute -entry computeMain -target spirv + +//CHECK: error 30623 + +interface Bug +{ + static const int badVar = 0; +} + +RWStructuredBuffer<int> b; +[numthreads(1, 1, 1)] +void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID) +{ + b[0] = Bug::badVar; +} |
