diff --git a/compiler/tests/function/mod.rs b/compiler/tests/function/mod.rs index 0c62b34e76..8d8d33e65a 100644 --- a/compiler/tests/function/mod.rs +++ b/compiler/tests/function/mod.rs @@ -174,3 +174,13 @@ fn test_return_array_tuple_pass() { assert_satisfied(program); } + +// Test return tuples + +#[test] +fn test_return_tuple() { + let bytes = include_bytes!("return_tuple.leo"); + let program = parse_program(bytes).unwrap(); + + assert_satisfied(program); +} diff --git a/compiler/tests/function/return_tuple.leo b/compiler/tests/function/return_tuple.leo new file mode 100644 index 0000000000..c459740a47 --- /dev/null +++ b/compiler/tests/function/return_tuple.leo @@ -0,0 +1,11 @@ +// Returns a tuple of tuples. +function tuples() -> ((u8, u8), u32) { + let a: (u8, u8) = (1, 2); + let b: u32 = 3; + + return (a, b) +} + +function main() { + let t = tuples(); +} \ No newline at end of file