mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
fix: some bugs
Fixed: * argument `_` of anonymous function disappears * els crashes * incomplete `.update!` codegen
This commit is contained in:
parent
da7ff0a258
commit
2574de3a68
7 changed files with 121 additions and 50 deletions
|
@ -38,7 +38,9 @@ impl<Checker: BuildRunnable> Server<Checker> {
|
|||
.filter(|warn| warn.core.main_message.ends_with("is not used"))
|
||||
.collect::<Vec<_>>();
|
||||
for warn in warns {
|
||||
let range = util::loc_to_range(warn.core.loc).unwrap();
|
||||
let Some(range) = util::loc_to_range(warn.core.loc) else {
|
||||
continue;
|
||||
};
|
||||
match visitor.get_min_expr(range) {
|
||||
Some(Expr::Def(def)) => {
|
||||
let Some(mut range) = util::loc_to_range(def.loc()) else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue