cx
cx copied to clipboard
Slice bool: Problem with output of function
Describe the bug Can not get slice's bool as an output of a func
package main
func foo()(out []bool) {
out = append(out, true)
out = append(out, true)
out = append(out, true)
}
func main() {
var bar []bool
bar = foo()
i32.print(len(bar))
}
Result len(bar) = 0
@arfan499 Can you try to run this one and report result.
If it fails, then put in regression tests.
Can not get slice's bool as an output of a func and the result is still zero.
Result: len(bar) = 0
I have tested this code and result is 3, as it should be.
Code seems to work fine now.