aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authornico-bb <64324649+nico-bb@users.noreply.github.com>2022-07-28 03:42:26 +0200
committernico-bb <64324649+nico-bb@users.noreply.github.com>2022-07-28 03:42:26 +0200
commit75b817eb4bbb69e718cc5bf76a13708d9d3eb306 (patch)
tree8d76f2cee15e1a29a99fd748755e84df17acf9fd /tests
parentcdbc1bfd870ffc4d317b48ad49019fc9f6edb74f (diff)
Fixed resolving polymorphic procedure signature
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 f9e93da..5fda923 100644
--- a/tests/completions_test.odin
+++ b/tests/completions_test.odin
@@ -1349,6 +1349,26 @@ ast_new_completion :: proc(t: ^testing.T) {
}
@(test)
+ast_new_clone_completion :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package main
+ new_clone :: proc(data: $T) -> (^T, Allocator_Error) #optional_second {
+ }
+
+ Foo :: struct {}
+
+ main :: proc() {
+ adzz := new_clone(Foo{});
+ adzz*
+ }
+
+ `,
+ };
+
+ test.expect_completion_details(t, &source, "", {"test.adzz: Foo"});
+}
+
+@(test)
ast_rawtr_cast_completion :: proc(t: ^testing.T) {
source := test.Source {
main = `package main