8000
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.
1 parent e6c6f96 commit d26766bCopy full SHA for d26766b
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