mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
17 lines
262 B
V
17 lines
262 B
V
struct EmptyStruct {}
|
|
|
|
pub fn (f EmptyStruct) str() string {
|
|
return 'EmptyStruct{}'
|
|
}
|
|
|
|
fn new_s() EmptyStruct {
|
|
println('>get_foo')
|
|
return EmptyStruct{}
|
|
}
|
|
|
|
fn test_using_an_empty_struct_compiles_and_works() {
|
|
s := new_s()
|
|
eprintln('s: ${s}')
|
|
assert true
|
|
}
|