From b4c851fb1419f869bddaa08487f58376bc0a7144 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 19 Sep 2024 17:33:24 -0700 Subject: 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. --- tests/diagnostics/generic-constraint-left-hand-side.slang | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/diagnostics/generic-constraint-left-hand-side.slang (limited to 'tests') 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() where int : IInteger +{} \ No newline at end of file -- cgit v1.2.3