mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
de5b4f0497
* 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.
22 lines
524 B
V
22 lines
524 B
V
/*
|
|
// TODO: Fix this.
|
|
import time
|
|
|
|
// using a manual temporary intermediate variable should always work:
|
|
fn test_call_fn_that_requires_reference_with_function_that_returns_a_struct_manual(){
|
|
t1 := time.random()
|
|
t2 := t1.calc_unix()
|
|
println('tmp: $t2')
|
|
assert true
|
|
}
|
|
|
|
// v should produce temporary intermediate variables in chained calls:
|
|
fn test_call_fn_that_requires_reference_with_function_that_returns_a_struct_chained(){
|
|
res := (time.random().calc_unix())
|
|
println('res: $res')
|
|
assert true
|
|
}
|
|
*/
|
|
|
|
fn test_dummy(){}
|