summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-09-19 17:33:24 -0700
committerGitHub <noreply@github.com>2024-09-19 17:33:24 -0700
commitb4c851fb1419f869bddaa08487f58376bc0a7144 (patch)
treedeb03bf30a5f9c616c152751d05ba990b9ed4253 /tests/diagnostics
parent067795689035e97c27239da48ed5c61b26e88301 (diff)
Add diagnostic to verify the left hand side of a generic constraint. (#5112)
* Add diagnostic to verify the left hand side of a generic constraint. * Fix comment.
Diffstat (limited to 'tests/diagnostics')
-rw-r--r--tests/diagnostics/generic-constraint-left-hand-side.slang7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/diagnostics/generic-constraint-left-hand-side.slang b/tests/diagnostics/generic-constraint-left-hand-side.slang
new file mode 100644
index 000000000..61a5f6df3
--- /dev/null
+++ b/tests/diagnostics/generic-constraint-left-hand-side.slang
@@ -0,0 +1,7 @@
+//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):
+
+// Check that we can issue diagnostic on invalid left hand side of a type constraint.
+
+// CHECK: ([[# @LINE+1]]): error 30402
+void f<T>() where int : IInteger
+{} \ No newline at end of file