struct Container { mut: items []T } fn (mut c Container) pop() ?T { return c.items.pop() } struct Item { data string priority int } fn test_generic_array_pop_call() { mut a1 := Container{ items: [11, 22] } println(a1) ret1 := a1.pop() or { 0 } println(ret1) assert ret1 == 22 item1 := Item{'a', 1} item2 := Item{'b', 2} mut a2 := Container{ items: [item1, item2] } println(a2) ret2 := a2.pop() or { Item{} } assert ret2 == item2 }