v2 / vlib / v / tests / generics / generic_array_of_alias_test.v
13 lines · 10 sloc · 189 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1import datatypes
2
3type Distance = int
4
5struct Foo {
6 field datatypes.LinkedList[Distance]
7}
8
9fn test_generic_array_of_alias() {
10 foo := Foo{}
11 println(foo)
12 assert '${foo.field}' == '[]'
13}
14