Revert "fix(pattern2): return Ok(None) for unpromoted LoopBodyLocal instead of Err"
This reverts commit e0278405c0.
This commit is contained in:
@ -119,17 +119,10 @@ impl PromoteStepBox {
|
||||
inputs.read_only_body_local_slot = Some(slot);
|
||||
}
|
||||
PolicyDecision::Reject(reason) => {
|
||||
// Phase 263 P0: Pattern2 cannot handle reassigned body-local variables.
|
||||
// Return without error to allow Pattern1 or other patterns to handle this case
|
||||
// without breaking detection→extract→lower SSOT.
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
eprintln!(
|
||||
"[pattern2/promote_step] Cannot promote LoopBodyLocal {:?}: {}",
|
||||
cond_body_local_vars, reason
|
||||
);
|
||||
}
|
||||
// Skip promotion and continue (no-op, same as PolicyDecision::None)
|
||||
return Err(error_messages::format_error_pattern2_promotion_failed(
|
||||
&cond_body_local_vars,
|
||||
&reason,
|
||||
));
|
||||
}
|
||||
PolicyDecision::None => {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user