aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/signatures_test.odin35
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