Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Oct 13, 2024
1 parent 7556015 commit a4cd3d0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions vlib/v/fmt/tests/fn_call_concrete_type_keep.vv
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
fn to_v_array[T](d &T, len u32) []T {
mut ret := unsafe { []T{len: int(len)} }
for i in 0 .. len {
unsafe {
ret[i] = d[i]
}
}
unsafe {
free(d)
}
return ret
}

fn main() {
to_v_array[C.Foo](C.Foo{}, 123.2)
}

0 comments on commit a4cd3d0

Please sign in to comment.