summaryrefslogtreecommitdiff
path: root/tests/diagnostics
diff options
context:
space:
mode:
Diffstat (limited to 'tests/diagnostics')
-rw-r--r--tests/diagnostics/unresolved-symbol.slang18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/diagnostics/unresolved-symbol.slang b/tests/diagnostics/unresolved-symbol.slang
new file mode 100644
index 000000000..d5c8444fc
--- /dev/null
+++ b/tests/diagnostics/unresolved-symbol.slang
@@ -0,0 +1,18 @@
+//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target hlsl -entry main -profile cs_6_0
+interface IFoo
+{
+ int doThing();
+}
+
+// CHECK: ([[#@LINE+1]]): error 45001:
+extern struct Foo : IFoo;
+// CHECK: ([[#@LINE+1]]): error 45001:
+extern static const int c;
+
+RWStructuredBuffer<int> output;
+
+void main()
+{
+ Foo f;
+ output[0] = c + f.doThing();
+} \ No newline at end of file