aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2024-10-03 21:30:40 +0200
committerDanielGavin <danielgavin5@hotmail.com>2024-10-03 21:30:40 +0200
commitafe0c725e0bd3a0b79adddf3c997391a5088ab35 (patch)
tree98e6573746639cbe4edbad3364bb58931457e0e0 /tests
parent4b8678b8f6b54e3c8dbbbd943228e6b9c919f330 (diff)
Fix issues with call expression inside another generic call expression.
Diffstat (limited to 'tests')
-rw-r--r--tests/completions_test.odin23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin
index b695732..b97ba1a 100644
--- a/tests/completions_test.odin
+++ b/tests/completions_test.odin
@@ -2973,3 +2973,26 @@ ast_switch_completion_multiple_cases :: proc(t: ^testing.T) {
test.expect_completion_details(t, &source, "", {})
}
+
+
+@(test)
+ast_generics_chained_procedures :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package main
+ foo :: proc (v: int) -> int {
+ return v
+ }
+
+ bar :: proc (v: $T) -> T {
+ return v
+ }
+
+ main :: proc () {
+ valzz := bar(foo(123))
+ valz{*}
+ }
+ `,
+ }
+
+ test.expect_completion_details(t, &source, "", {"test.valzz: int"})
+}