diff options
| author | Yong He <yonghe@outlook.com> | 2021-10-21 15:51:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-21 15:51:18 -0700 |
| commit | 9304c2d04c9bfbae33cc328d404b24aba375aa4f (patch) | |
| tree | 88473d2ca0b03341f84bca17b359ae45c4becfaa /tests | |
| parent | 66e319e34b99eff0a8d27be524ab4a831437ac1b (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')
| -rw-r--r-- | tests/diagnostics/no-type-conformance.slang | 19 | ||||
| -rw-r--r-- | tests/diagnostics/no-type-conformance.slang.expected | 8 |
2 files changed, 27 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 diff --git a/tests/diagnostics/no-type-conformance.slang.expected b/tests/diagnostics/no-type-conformance.slang.expected new file mode 100644 index 000000000..bc38fa7f1 --- /dev/null +++ b/tests/diagnostics/no-type-conformance.slang.expected @@ -0,0 +1,8 @@ +result code = -1 +standard error = { +tests/diagnostics/no-type-conformance.slang(4): error 50100: No type conformances are found for interface 'IFoo'. Code generation for current target requires at least one implementation type present in the linkage. +interface IFoo + ^~~~ +} +standard output = { +} |
