v/vlib/v/tests/empty_interface_test.v

15 lines
190 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'
}