summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-10-29 16:27:51 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-10-29 16:27:51 -0400
commite8f079fea8cbc87e1e007c15954d90e1c8e34e15 (patch)
treea8c93e303ab5b5275cbcec54fbedf25fbe2ce5c8
parentcce38ecb7d006b22bc0b8fb7c483561a477ebd22 (diff)
Add complete types for untyped expr as we now show full values for constants
-rw-r--r--src/server/documentation.odin6
-rw-r--r--tests/hover_test.odin6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/server/documentation.odin b/src/server/documentation.odin
index c190837..3ae3c53 100644
--- a/src/server/documentation.odin
+++ b/src/server/documentation.odin
@@ -438,7 +438,7 @@ write_short_signature :: proc(sb: ^strings.Builder, ast_context: ^AstContext, sy
if .Mutable in symbol.flags || symbol.type == .Field {
switch v.type {
case .Float:
- strings.write_string(sb, "float")
+ strings.write_string(sb, "f64")
case .String:
strings.write_string(sb, "string")
case .Bool:
@@ -446,9 +446,9 @@ write_short_signature :: proc(sb: ^strings.Builder, ast_context: ^AstContext, sy
case .Integer:
strings.write_string(sb, "int")
case .Complex:
- strings.write_string(sb, "complex")
+ strings.write_string(sb, "complex128")
case .Quaternion:
- strings.write_string(sb, "quaternion")
+ strings.write_string(sb, "quaternion256")
}
return
}
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index c3d6729..391ff60 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -4506,7 +4506,7 @@ ast_hover_float_binary_expr :: proc(t: ^testing.T) {
}
`,
}
- test.expect_hover(t, &source, "test.bar: float")
+ test.expect_hover(t, &source, "test.bar: f64")
}
@(test)
@@ -5332,7 +5332,7 @@ ast_hover_complex_number_literal :: proc(t: ^testing.T) {
`,
}
- test.expect_hover(t, &source, "test.foo: complex")
+ test.expect_hover(t, &source, "test.foo: complex128")
}
@(test)
@@ -5345,7 +5345,7 @@ ast_hover_quaternion_literal :: proc(t: ^testing.T) {
`,
}
- test.expect_hover(t, &source, "test.foo: quaternion")
+ test.expect_hover(t, &source, "test.foo: quaternion256")
}
/*