diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/diagnostics/generic-value-parameter-must-have-type.slang | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/diagnostics/generic-value-parameter-must-have-type.slang b/tests/diagnostics/generic-value-parameter-must-have-type.slang new file mode 100644 index 000000000..a7920b86c --- /dev/null +++ b/tests/diagnostics/generic-value-parameter-must-have-type.slang @@ -0,0 +1,21 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv + +interface ITest +{ + static const uint kValue0; + static const uint kValue1; +}; + +// `TValue1` does not have an explicit type, this should fail to compile. +// CHECK: error 30623: a generic value parameter +// Make sure erroneous code is printed out. +// CHECK: let TValue1> +struct TestImpl<let TValue0 : uint, let TValue1> : ITest +{ + static const uint kValue0 = TValue0; + static const uint kValue1 = TValue1; +}; + +void computeMain() +{ +} |
