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

15 lines
192 B
V

interface Any {}
fn print_out(x Any) string {
if x is string {
println(x)
return '${x}'
}
return ''
}
fn test_empty_interface() {
ret := print_out('12345')
assert ret == '&12345'
}