diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2021-04-28 16:09:57 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2021-04-28 16:09:57 +0200 |
| commit | ccb615d87742e9f79da905324e8674eb78ecdf6f (patch) | |
| tree | c024c50b4c377d341fd814d7bf59f9cc7086a0b1 /tests | |
| parent | 9a8eaddc66b186ea6227cafab026afdb32b841cb (diff) | |
distinct type overload works
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/signatures_test.odin | 35 |
1 files changed, 35 insertions, 0 deletions
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 |