summaryrefslogtreecommitdiff
path: root/tests/diagnostics/no-type-conformance.slang
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-10-21 15:51:18 -0700
committerGitHub <noreply@github.com>2021-10-21 15:51:18 -0700
commit9304c2d04c9bfbae33cc328d404b24aba375aa4f (patch)
tree88473d2ca0b03341f84bca17b359ae45c4becfaa /tests/diagnostics/no-type-conformance.slang
parent66e319e34b99eff0a8d27be524ab4a831437ac1b (diff)
Diagnostic for no type conformance + bug fix. (#1985)
* Diagnostic for no type conformance + bug fix. * Fixes. * Fix. * Include heterogeneous example only with --enable-experimental-projects premake flag Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
Diffstat (limited to 'tests/diagnostics/no-type-conformance.slang')
-rw-r--r--tests/diagnostics/no-type-conformance.slang19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/diagnostics/no-type-conformance.slang b/tests/diagnostics/no-type-conformance.slang
new file mode 100644
index 000000000..ada4f663a
--- /dev/null
+++ b/tests/diagnostics/no-type-conformance.slang
@@ -0,0 +1,19 @@
+//DIAGNOSTIC_TEST:COMMAND_LINE_SIMPLE:-target hlsl -entry computeMain -stage compute -o no-type-conformance.hlsl
+// no type conformance linked
+
+interface IFoo
+{
+ float get();
+}
+
+void foo()
+{
+ IFoo obj;
+ obj.get();
+}
+
+[numthreads(1, 1, 1)]
+void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
+{
+ foo();
+} \ No newline at end of file