From f3454c776932e1d5c55e6bfe36f7d4d21798dfa9 Mon Sep 17 00:00:00 2001 From: DanielGavin Date: Tue, 15 Aug 2023 23:27:42 +0200 Subject: Fix issues with not being able to resolve non mutable functions in other functions. --- tests/completions_test.odin | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'tests') diff --git a/tests/completions_test.odin b/tests/completions_test.odin index 3078a14..eba8623 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -2331,3 +2331,34 @@ ast_bitset_assignment_diff_pkg :: proc(t: ^testing.T) { test.expect_completion_labels(t, &source, ".", {"Aa", "Ab", "Ac", "Ad"}) } + +@(test) +ast_local_global_function :: proc(t: ^testing.T) { + packages := make([dynamic]test.Package) + + source := test.Source { + main = `package main + import "my_package" + + main :: proc() { + my_function_two :: proc(one: int) { + my_{*} + } + + my_function_one :: proc(one: int) { + + } + + } + + `, + packages = packages[:], + } + + test.expect_completion_details( + t, + &source, + "", + {"test.my_function_two: proc(one: int)"}, + ) +} -- cgit v1.2.3