diff options
Diffstat (limited to 'v_windows/v/vlib/v/tests/generics_multi_array_in_test.v')
-rw-r--r-- | v_windows/v/vlib/v/tests/generics_multi_array_in_test.v | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/tests/generics_multi_array_in_test.v b/v_windows/v/vlib/v/tests/generics_multi_array_in_test.v new file mode 100644 index 0000000..fb3be8b --- /dev/null +++ b/v_windows/v/vlib/v/tests/generics_multi_array_in_test.v @@ -0,0 +1,14 @@ +fn include<T>(a T, b []T) bool { + return a in b +} + +fn test_generics_multi_array_in() { + println(include(1, [1])) + assert include(1, [1]) + + println(include([1], [[1]])) + assert include([1], [[1]]) + + println(include([[1]], [[[1]]])) + assert include([[1]], [[[1]]]) +} |