From c97166aed29e0a224d49cec0b12503d1a10b52e0 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 15 Oct 2024 18:54:16 -0700 Subject: Fix type checking on generic extensions. (#5316) Add fcpw library to test suite. --- tests/bugs/gh-5140.slang | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/bugs/gh-5140.slang (limited to 'tests/bugs') 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 +{ +} + +public extension> a1 +{ + void foo() { + outputBuffer[0] = 1.0; + } +} + +RWStructuredBuffer outputBuffer; +struct S : A { +} + +void helper>(a a2) +{ + a2.foo(); +} + +// CHECK: 1 + +[numthreads(1,1,1)] +void computeMain() +{ + S a; + helper(a); +} \ No newline at end of file -- cgit v1.2.3