Phase 33 NORM canon test: enforce normalized dev route for P1/P2/JP mini
This commit is contained in:
@ -116,7 +116,10 @@ impl MethodCallLowerer {
|
||||
if args.len() != expected_arity {
|
||||
return Err(format!(
|
||||
"Arity mismatch: {}.{}() expects {} args, got {}",
|
||||
recv_val.0, method_name, expected_arity, args.len()
|
||||
recv_val.0,
|
||||
method_name,
|
||||
expected_arity,
|
||||
args.len()
|
||||
));
|
||||
}
|
||||
|
||||
@ -127,7 +130,7 @@ impl MethodCallLowerer {
|
||||
arg_ast,
|
||||
alloc_value,
|
||||
env,
|
||||
instructions
|
||||
instructions,
|
||||
)?;
|
||||
lowered_args.push(arg_val);
|
||||
}
|
||||
@ -201,7 +204,10 @@ impl MethodCallLowerer {
|
||||
if args.len() != expected_arity {
|
||||
return Err(format!(
|
||||
"Arity mismatch: {}.{}() expects {} args, got {}",
|
||||
recv_val.0, method_name, expected_arity, args.len()
|
||||
recv_val.0,
|
||||
method_name,
|
||||
expected_arity,
|
||||
args.len()
|
||||
));
|
||||
}
|
||||
|
||||
@ -214,7 +220,7 @@ impl MethodCallLowerer {
|
||||
alloc_value,
|
||||
cond_env,
|
||||
body_local_env,
|
||||
instructions
|
||||
instructions,
|
||||
)?;
|
||||
lowered_args.push(arg_val);
|
||||
}
|
||||
@ -311,8 +317,8 @@ impl MethodCallLowerer {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::mir::join_ir::JoinInst;
|
||||
use crate::mir::join_ir::lowering::loop_body_local_env::LoopBodyLocalEnv;
|
||||
use crate::mir::join_ir::JoinInst;
|
||||
|
||||
#[test]
|
||||
fn test_resolve_string_length() {
|
||||
@ -391,7 +397,9 @@ mod tests {
|
||||
);
|
||||
|
||||
assert!(result.is_err());
|
||||
assert!(result.unwrap_err().contains("not allowed in loop condition"));
|
||||
assert!(result
|
||||
.unwrap_err()
|
||||
.contains("not allowed in loop condition"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -461,7 +469,9 @@ mod tests {
|
||||
&mut instructions,
|
||||
);
|
||||
assert!(cond_result.is_err());
|
||||
assert!(cond_result.unwrap_err().contains("not allowed in loop condition"));
|
||||
assert!(cond_result
|
||||
.unwrap_err()
|
||||
.contains("not allowed in loop condition"));
|
||||
|
||||
// But IS allowed in init context
|
||||
// Phase 226: Create empty LoopBodyLocalEnv
|
||||
|
||||
Reference in New Issue
Block a user