From 75b817eb4bbb69e718cc5bf76a13708d9d3eb306 Mon Sep 17 00:00:00 2001 From: nico-bb <64324649+nico-bb@users.noreply.github.com> Date: Thu, 28 Jul 2022 03:42:26 +0200 Subject: Fixed resolving polymorphic procedure signature --- tests/completions_test.odin | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests') 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 @@ -1348,6 +1348,26 @@ ast_new_completion :: proc(t: ^testing.T) { test.expect_completion_details(t, &source, "", {"test.adzz: int"}); } +@(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 { -- cgit v1.2.3