mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
feat: make erg_compiler
available as a Python lib
This commit is contained in:
parent
22ccf4d870
commit
8b17c6cf6c
9 changed files with 152 additions and 4 deletions
|
@ -37,7 +37,7 @@ impl HIROptimizer {
|
|||
fn eliminate_unused_def(&mut self, expr: &mut Expr) {
|
||||
match expr {
|
||||
Expr::Def(def) => {
|
||||
if def.sig.ident().is_discarded() {
|
||||
if def.sig.ident().is_discarded() || def.sig.vis().is_public() {
|
||||
return;
|
||||
}
|
||||
if self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue