ci: disable gitly autofree build for now

pull/6357/head
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 git clone --depth 1 https://github.com/vlang/gitly
cd gitly cd gitly
../v . ../v .
../v -autofree . # ../v -autofree .
cd .. cd ..
# TODO: ACTIVATE THIS AFTER MERGE # TODO: ACTIVATE THIS AFTER MERGE

View File

@ -533,6 +533,7 @@ fn (mut g Gen) fn_call(node ast.CallExpr) {
// `foo<int>()` => `foo_int()` // `foo<int>()` => `foo_int()`
name += '_' + g.typ(node.generic_type) 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, // 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)` // like `foo(get_string())` or `foo(a + b)`
mut free_tmp_arg_vars := g.autofree && g.pref.experimental && !g.is_builtin_mod && 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() { fn optional_str() {
q := 'select' q := 'select'
s := 'x' s := 'x'
// optional fn args must be freed
pos2 := opt('query:$q') or { pos2 := opt('query:$q') or {
// pos := s.index('query: $q') or { // pos := s.index('query: $q') or {
println('exiting') println('exiting')
return 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() { fn main() {