1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: disable gitly autofree build for now

This commit is contained in:
Alexander Medvednikov 2020-09-13 03:06:16 +02:00
parent db51ee08ea
commit f074d766e5
3 changed files with 12 additions and 2 deletions

View File

@ -475,7 +475,7 @@ jobs:
git clone --depth 1 https://github.com/vlang/gitly
cd gitly
../v .
../v -autofree .
# ../v -autofree .
cd ..
# TODO: ACTIVATE THIS AFTER MERGE

View File

@ -533,6 +533,7 @@ fn (mut g Gen) fn_call(node ast.CallExpr) {
// `foo<int>()` => `foo_int()`
name += '_' + g.typ(node.generic_type)
}
// g.generate_tmp_autofree_arg_vars()
// Create a temporary var for each argument in order to free it (only if it's a complex expression,
// like `foo(get_string())` or `foo(a + b)`
mut free_tmp_arg_vars := g.autofree && g.pref.experimental && !g.is_builtin_mod &&

View File

@ -71,12 +71,21 @@ fn opt(s string) ?int {
fn optional_str() {
q := 'select'
s := 'x'
// optional fn args must be freed
pos2 := opt('query:$q') or {
// pos := s.index('query: $q') or {
println('exiting')
return
}
println(pos2)
println(pos2 + 1)
// optional method args must be freed
/*
pos := s.index('query: $q') or {
println('exiting')
return
}
println(pos + 1)
*/
}
fn main() {