diff options
Diffstat (limited to 'tests/bugs')
| -rw-r--r-- | tests/bugs/gh-5140.slang | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/bugs/gh-5140.slang b/tests/bugs/gh-5140.slang new file mode 100644 index 000000000..23d9b3a23 --- /dev/null +++ b/tests/bugs/gh-5140.slang @@ -0,0 +1,33 @@ +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-d3d11 -output-using-type + +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer + +public interface A<T: IFloat> +{ +} + +public extension<T1: IFloat, a1 : A<T1>> a1 +{ + void foo() { + outputBuffer[0] = 1.0; + } +} + +RWStructuredBuffer<float> outputBuffer; +struct S : A<float> { +} + +void helper<T: IFloat, a : A<T>>(a a2) +{ + a2.foo(); +} + +// CHECK: 1 + +[numthreads(1,1,1)] +void computeMain() +{ + S a; + helper(a); +}
\ No newline at end of file |
