Skip to content

Commit

Permalink
Fix bug where return self.caller caused panic
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-schott committed Apr 22, 2024
1 parent 13b29db commit f93d77b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/passes/src/flattening/flatten_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ impl StatementReconstructor for Flattener<'_> {
let guard = self.construct_guard();

match input.expression {
Expression::Unit(_) | Expression::Identifier(_) => self.returns.push((guard, input)),
Expression::Unit(_) | Expression::Identifier(_) | Expression::Access(_) => self.returns.push((guard, input)),
_ => unreachable!("SSA guarantees that the expression is always an identifier or unit expression."),
};

Expand Down

0 comments on commit f93d77b

Please sign in to comment.