1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/compiler/tests/fn_expecting_ref_but_returning_struct_test.v
Delyan Angelov de5b4f0497 fix tests for tcc, extract failing stuff to separate simpler files to ease debugging
* Fix compiling vlib/compiler/tests/fn_test.v with tcc.

* Extract failing tests from fn_test.v so that they are more readable and easier to debug.
2019-11-11 17:59:59 +03:00

24 lines
368 B
V

struct Foo {
}
fn (f Foo) str() string { return 'Foo{}' }
fn process_foo(foo &Foo) {
println('>process_foo, called for ${foo} === ${*foo}')
}
fn get_foo() Foo {
println('>get_foo')
return Foo{}
}
/*
// TODO: Fix this. It 'works' only with tcc, but is not stable.
fn test_ref_fn_arg() {
process_foo(get_foo())
println(3434)
assert true
}
*/
fn test_dummy(){}