aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2021-12-30 23:48:18 +0100
committerDaniel Gavin <danielgavin5@hotmail.com>2021-12-30 23:48:18 +0100
commitaf15c040ce045df81567402cc4ce80412dd36b8f (patch)
tree4d3411bfc67c33eb7a7358e9c744f60f5b0f3ddc /tests
parent7b2281e5fd7efe6959d9d6cfe2758b1fbaadc247 (diff)
Fix signatures
Diffstat (limited to 'tests')
-rw-r--r--tests/signatures_test.odin22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/signatures_test.odin b/tests/signatures_test.odin
index 0e0af1f..9363962 100644
--- a/tests/signatures_test.odin
+++ b/tests/signatures_test.odin
@@ -486,6 +486,28 @@ shared_value_decl_type_signature :: proc(t: ^testing.T) {
test.expect_signature_labels(t, &source, {"test.my_function: proc(a: int, b: int)"});
}
+@(test)
+proc_with_struct_poly :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ U :: struct(N: int, E: typetid) {
+ t: [N]E,
+ }
+
+ uf :: proc(u: U($T, $E)) {
+ }
+
+ main :: proc() {
+ uf(*)
+ }
+ `,
+ packages = {},
+ };
+
+ test.expect_signature_labels(t, &source, {"test.uf: proc(u: U($T, $E))"});
+}
+
+
/*
@(test)
signature_function_inside_when :: proc(t: ^testing.T) {