From ccb615d87742e9f79da905324e8674eb78ecdf6f Mon Sep 17 00:00:00 2001 From: Daniel Gavin Date: Wed, 28 Apr 2021 16:09:57 +0200 Subject: distinct type overload works --- tests/signatures_test.odin | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'tests') diff --git a/tests/signatures_test.odin b/tests/signatures_test.odin index ccefc35..9877577 100644 --- a/tests/signatures_test.odin +++ b/tests/signatures_test.odin @@ -92,4 +92,39 @@ ast_proc_group_signature_basic_types :: proc(t: ^testing.T) { }; test.expect_signature_labels(t, &source, {"test.int_function: proc(a: int, b: bool, c: int)"}); +} + + +@(test) +ast_proc_group_signature_distinct_basic_types :: proc(t: ^testing.T) { + + source := test.Source { + main = `package test + + My_Int :: distinct int; + + distinct_function :: proc(a: My_Int, c: int) { + + } + + int_function :: proc(a: int, c: int) { + + } + + group_function :: proc { + int_function, + distinct_function, + }; + + main :: proc() { + + a: My_Int; + + group_function(a, *) + } + `, + source_packages = {}, + }; + + test.expect_signature_labels(t, &source, {"test.distinct_function: proc(a: My_Int, c: int)"}); } \ No newline at end of file -- cgit v1.2.3