diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2023-08-15 23:27:42 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2023-08-15 23:27:42 +0200 |
| commit | f3454c776932e1d5c55e6bfe36f7d4d21798dfa9 (patch) | |
| tree | a8ad5ae101aeb86cfcb80827fe52e993ac79180c /tests | |
| parent | 9aa25ed10ca478e8ae4331f42d8f92f7e69664a3 (diff) | |
Fix issues with not being able to resolve non mutable functions in other functions.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/completions_test.odin | 31 |
1 files changed, 31 insertions, 0 deletions
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)"}, + ) +} |