v
v copied to clipboard
c error on build
V version: 0.3.0 d6de533.f1ebfb2 OS: macos, macOS, 12.4, 21F79
What did you do?
module main
import context
struct Ctx {
ctx context.Context
}
fn smth_with_ctx(ctx context.Context) Ctx {
println('$ctx')
return Ctx{
ctx: ctx
}
}
fn main() {
ctx := context.todo()
rslt := smth_with_ctx(ctx)
println('$rslt')
}
What did you expect to see? no c error
What did you see instead?
/tmp/v_1000/main.10738188785791973297.tmp.c:3818: warning: implicit declaration of function 'context__Context_str'
/tmp/v_1000/main.10738188785791973297.tmp.c:3818: error: '{' expected (got ";")