diff --git a/vlib/v/gen/fn.v b/vlib/v/gen/fn.v index 38496b1ad0..f1b5c3ff6d 100644 --- a/vlib/v/gen/fn.v +++ b/vlib/v/gen/fn.v @@ -448,7 +448,8 @@ fn (mut g Gen) method_call(node ast.CallExpr) { if !is_range_slice { g.write('&') } - } else if !node.receiver_type.is_ptr() && node.left_type.is_ptr() && node.name != 'str' { + } else if !node.receiver_type.is_ptr() && node.left_type.is_ptr() && node.name != 'str' && + node.from_embed_type == 0 { g.write('/*rec*/*') } if node.free_receiver && !g.inside_lambda && !g.is_builtin_mod { diff --git a/vlib/vweb/vweb.v b/vlib/vweb/vweb.v index 1675371d9b..79901f2e9f 100644 --- a/vlib/vweb/vweb.v +++ b/vlib/vweb/vweb.v @@ -58,6 +58,12 @@ pub mut: form_error string } +// declaring init_once in your App struct is optional +pub fn (ctx Context) init_once() {} + +// declaring init in your App struct is optional +pub fn (ctx Context) init() {} + pub struct Cookie { name string value string