Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e6c6f96 + d26766b commit d0c827eCopy full SHA for d0c827e
compiler/codegen/src/compile.rs
@@ -478,8 +478,8 @@ impl Compiler {
478
self.check_forbidden_name(&name, usage)?;
479
480
let symbol_table = self.symbol_table_stack.last().unwrap();
481
- let symbol = symbol_table.lookup(name.as_ref()).expect(
482
- "The symbol must be present in the symbol table, even when it is undefined in python.",
+ let symbol = symbol_table.lookup(name.as_ref()).unwrap_or_else(||
+ panic!("The symbol '{name}' must be present in the symbol table, even when it is undefined in python."),
483
);
484
let info = self.code_stack.last_mut().unwrap();
485
let mut cache = &mut info.name_cache;
0 commit comments