diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/odin/printer/visit.odin | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/odin/printer/visit.odin b/src/odin/printer/visit.odin index f21eeaa..0568026 100644 --- a/src/odin/printer/visit.odin +++ b/src/odin/printer/visit.odin @@ -557,7 +557,7 @@ is_values_return_stmt_callable :: proc(list: []^ast.Expr) -> bool { } #partial switch v in result.derived { - case ^ast.Call_Expr: + case ^ast.Call_Expr, ^ast.Comp_Lit: return false } } @@ -574,6 +574,10 @@ is_return_stmt_ending_with_call_expr :: proc(list: []^ast.Expr) -> bool { return true } + if _, is_cmp := list[len(list) - 1].derived.(^ast.Comp_Lit); is_cmp { + return true + } + return false } |