diff --git a/compiler/erg_compiler/hir.rs b/compiler/erg_compiler/hir.rs index eb6f22c5..c039aed8 100644 --- a/compiler/erg_compiler/hir.rs +++ b/compiler/erg_compiler/hir.rs @@ -1610,7 +1610,7 @@ impl Locational for Params { } else if !self.defaults.is_empty() { Location::concat(&self.defaults[0], self.defaults.last().unwrap()) } else { - panic!() + Location::Unknown } } } diff --git a/compiler/erg_parser/ast.rs b/compiler/erg_parser/ast.rs index 99fcf5e8..013a97bc 100644 --- a/compiler/erg_parser/ast.rs +++ b/compiler/erg_parser/ast.rs @@ -2959,7 +2959,7 @@ impl Locational for Params { } else if !self.defaults.is_empty() { Location::concat(&self.defaults[0], self.defaults.last().unwrap()) } else { - panic!() + Location::Unknown } } }