variable_accessible_in_finally was not correctly working as symbol
lookup failed due to local.active set to false by visit_member_access.
if (stmt.return_expression != null) {
// avoid unnecessary ref/unref pair
var local = stmt.return_expression.symbol_reference as LocalVariable;
- if (current_return_type.value_owned
- && local != null && local.variable_type.value_owned
- && !local.captured
- && !variable_accessible_in_finally (local)) {
+ if (local != null && !local.active) {
/* return expression is local variable taking ownership and
* current method is transferring ownership */