From cc1b96d91d8875bf727079d58fbf78af1135f505 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 30 Dec 2024 23:39:07 -0800 Subject: Check mismatching method parameter direction against interface declaration. (#5964) --- .../modules/wrapper-property.slang | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/language-feature/modules/wrapper-property.slang (limited to 'tests/language-feature/modules/wrapper-property.slang') diff --git a/tests/language-feature/modules/wrapper-property.slang b/tests/language-feature/modules/wrapper-property.slang new file mode 100644 index 000000000..cfd9798b7 --- /dev/null +++ b/tests/language-feature/modules/wrapper-property.slang @@ -0,0 +1,24 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv + +//CHECK: OpEntryPoint + +public interface ITest { + public property int val; +}; + +public struct TestImpl : ITest { + public int val; +} + +public struct Test : ITest = TestImpl; + +StructuredBuffer data; +RWStructuredBuffer output; + +[shader("compute")] +[numthreads(1,1,1)] +void computeMain() +{ + int val = data[0].val; + output[0] = val; +} \ No newline at end of file -- cgit v1.2.3