v
v copied to clipboard
No warnings or errors about infinite recursion
Describe the bug
Infinite recursive function calls happens many time per second, after approximately a second app just finishes
Expected Behavior
Compiler should give error or warning during compilation.
Current Behavior
There are no errors. After app finishes there is (Segmentation fault) in console
Reproduction Steps
module main
fn get_array_of_values() [][]int {
mut results := [][]int{}
for i in 0 .. 10 {
results << get_values()
}
return results
}
fn get_values() []int {
println('function get_values() called')
mut results := []int{}
for i in 0 .. 10 {
results << get_array_of_values()[0][i]
}
return results
}
fn main() {
print(get_array_of_values())
}
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.3.3 2879afa
Environment details (OS name and version, etc.)
Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i3-1005G1 CPU @ 1.20GHz
CC version: cc (GCC) 12.2.1 20230201
getwd: /home/hedgegod/code
vmodules: /home/hedgegod/.vmodules
vroot: /home/hedgegod/kernels/v
vexe: /home/hedgegod/kernels/v/v
vexe mtime: 2023-02-22 17:11:44
is vroot writable: true
is vmodules writable: true
V full version: V 0.3.3 0b7a1cd.2879afa
Git version: git version 2.39.2
Git vroot status: weekly.2023.05-83-g2879afad-dirty (1 commit(s) behind V master)
.git/config present: true
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3```