File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -4664,6 +4664,7 @@ fn (mut g Gen) return_statement(node ast.Return) {
4664
4664
if optional_none || is_regular_option || node.types[0 ] == ast.error_type_idx {
4665
4665
g.write ('return ' )
4666
4666
g.gen_optional_error (g.fn_decl.return_type, node.exprs[0 ])
4667
+ // g.writeln('; /*ret1*/')
4667
4668
g.writeln (';' )
4668
4669
return
4669
4670
}
@@ -4778,6 +4779,7 @@ fn (mut g Gen) return_statement(node ast.Return) {
4778
4779
}
4779
4780
}
4780
4781
g.writeln (' }, (Option*)(&$opt_tmp ), sizeof($styp ));' )
4782
+ g.autofree_scope_vars (node.pos.pos - 1 , node.pos.line_nr, true )
4781
4783
g.writeln ('return $opt_tmp ;' )
4782
4784
return
4783
4785
}
Original file line number Diff line number Diff line change @@ -353,6 +353,8 @@ fn parse_header0(s string) ?string {
353
353
return error ('missing colon in header' )
354
354
}
355
355
words := s.split_nth (':' , 2 )
356
+ // x := words[0]
357
+ // return x
356
358
return words[0 ]
357
359
}
358
360
@@ -386,7 +388,7 @@ fn main() {
386
388
s2 := return_sb_str ()
387
389
// free_map()
388
390
// loop_map()
389
- // advanced_optionals()
391
+ advanced_optionals ()
390
392
free_array_except_returned_element ()
391
393
println ('end' )
392
394
}
You can’t perform that action at this time.
0 commit comments