diff options
| author | Yong He <yonghe@outlook.com> | 2024-12-10 03:50:00 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-10 19:50:00 +0800 |
| commit | 8bf4743f5665ca3d9d04e4c93f7678c48e71aae0 (patch) | |
| tree | d7afaa1cdeaeccb0b5b02f7a15772125c912f278 /tests | |
| parent | 89bf795f105ebe2703ee74a021e16786990ca7b2 (diff) | |
Create scope for synthesized property decl. (#5817)
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bugs/dynamic-interface-property.slang | 24 |
1 files changed, 24 insertions, 0 deletions
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<ITest> inputBuffer; + +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer +RWStructuredBuffer<int> outputBuffer; + +[NumThreads(1, 1, 1)] +void computeMain() +{ + // CHECK: 1 + outputBuffer[0] = inputBuffer[0].value; +} |
