1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/v/tests/generic_fn_upper_name_type_test.v

19 lines
306 B
V

struct XX {
x int
}
struct YY {
y int
}
fn show_result[T, U](x T, y U) bool {
return true
}
fn test_generic_fn_upper_name_type() {
assert show_result[int, bool](1, false)
assert show_result[string, XX]('s', XX{})
assert show_result[XX, string](XX{}, 's')
assert show_result[XX, YY](XX{}, YY{})
}