summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-01-29 23:11:06 -0800
committerGitHub <noreply@github.com>2025-01-29 23:11:06 -0800
commit2ae194d51e15c064c3d905e628f7335de7504e32 (patch)
tree6ff8df77913152537d7564499b383c719af732c3 /tests
parentcbcb97a64c0b7b908fc7be565b0d6141d2f1a1f7 (diff)
Fix ConstantIntVal::toText when the val is a enum. (#6224)
* Fix ConstantIntVal::toText when the val is a enum. * Fix comment.
Diffstat (limited to 'tests')
-rw-r--r--tests/language-server/typename-enum-intval.slang24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/language-server/typename-enum-intval.slang b/tests/language-server/typename-enum-intval.slang
new file mode 100644
index 000000000..9eca71ae2
--- /dev/null
+++ b/tests/language-server/typename-enum-intval.slang
@@ -0,0 +1,24 @@
+//TEST:LANG_SERVER(filecheck=CHECK):
+
+namespace ns {
+enum Test : uint32_t
+{
+ A = 1,
+ B = 2,
+}
+
+struct Foo<let T : Test>
+{
+}
+}
+
+void f()
+{
+//HOVER:18,25
+ ns.Foo<ns.Test.A> first;
+//HOVER:20,27
+ ns.Foo<ns.Test(3)> second;
+}
+
+// CHECK: ns.Foo<ns.Test.A>
+// CHECK: ns.Foo<ns.Test(3)> \ No newline at end of file