aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2024-10-05 23:51:34 +0200
committerDanielGavin <danielgavin5@hotmail.com>2024-10-05 23:51:34 +0200
commite872aec330a4dc5ef8a5ee6f85669b41ff52fc49 (patch)
treef804002fe100ad6fb46719c793a494872ab23be2 /tests
parenta18728ada67d36958de97319b85defd940f3c2cd (diff)
Fix issue with struct generics and pointer type
Diffstat (limited to 'tests')
-rw-r--r--tests/completions_test.odin20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin
index 2379ecb..49ac50f 100644
--- a/tests/completions_test.odin
+++ b/tests/completions_test.odin
@@ -2878,6 +2878,26 @@ ast_generics_struct_poly :: proc(t: ^testing.T) {
}
@(test)
+ast_generics_pointer_poly :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package main
+ AAA :: struct($T: typeid) {
+ value: ^T,
+ }
+
+ main :: proc() {
+ ttt: AAA(int)
+ ttt.{*}
+ }
+ `,
+ }
+
+ test.expect_completion_details(t, &source, ".", {"AAA.value: ^int"})
+
+}
+
+
+@(test)
ast_enumerated_array_index_completion :: proc(t: ^testing.T) {
source := test.Source {
main = `package main