From 8bf4743f5665ca3d9d04e4c93f7678c48e71aae0 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 10 Dec 2024 03:50:00 -0800 Subject: Create scope for synthesized property decl. (#5817) Co-authored-by: Ellie Hermaszewska --- tests/bugs/dynamic-interface-property.slang | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/bugs/dynamic-interface-property.slang (limited to 'tests') diff --git a/tests/bugs/dynamic-interface-property.slang b/tests/bugs/dynamic-interface-property.slang new file mode 100644 index 000000000..4243ce71b --- /dev/null +++ b/tests/bugs/dynamic-interface-property.slang @@ -0,0 +1,24 @@ +//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK):-output-using-type + +public interface ITest { + property int value; +}; + +struct Test : ITest { + int value; +}; + +//TEST_INPUT: type_conformance Test:ITest = 1; + +//TEST_INPUT: set inputBuffer = ubuffer(data=[0 0 1 0 1 0 0 0], stride=4) +RWStructuredBuffer inputBuffer; + +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer +RWStructuredBuffer outputBuffer; + +[NumThreads(1, 1, 1)] +void computeMain() +{ + // CHECK: 1 + outputBuffer[0] = inputBuffer[0].value; +} -- cgit v1.2.3