(params: &ast::Parameters)
| 231 | } |
| 232 | |
| 233 | fn validate_duplicate_params(params: &ast::Parameters) -> Result<(), CodegenErrorType> { |
| 234 | let mut seen_params = IndexSet::default(); |
| 235 | for param in params { |
| 236 | let param_name = param.name().as_str(); |
| 237 | if !seen_params.insert(param_name) { |
| 238 | return Err(CodegenErrorType::SyntaxError(format!( |
| 239 | r#"Duplicate parameter "{param_name}""# |
| 240 | ))); |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | Ok(()) |
| 245 | } |
| 246 | |
| 247 | /// Compile an Mod produced from ruff parser |
| 248 | pub fn compile_top( |
no test coverage detected