diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2021-12-30 23:48:18 +0100 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2021-12-30 23:48:18 +0100 |
| commit | af15c040ce045df81567402cc4ce80412dd36b8f (patch) | |
| tree | 4d3411bfc67c33eb7a7358e9c744f60f5b0f3ddc /tests | |
| parent | 7b2281e5fd7efe6959d9d6cfe2758b1fbaadc247 (diff) | |
Fix signatures
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/signatures_test.odin | 22 |
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) { |