Skip to content

Commit 21b81e6

Browse files
committed
[FIX] server: wrong diagnostic for imports with asname
1 parent 89a518e commit 21b81e6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/src/core/import_resolver.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ pub fn resolve_import_stmt(session: &mut SessionInfo, source_file_symbol: &Rc<Re
178178
result[name_index as usize].found = true;
179179
result[name_index as usize].symbol = last_symbol.as_ref().unwrap().clone();
180180
}
181+
} else {
182+
//everything is ok, let's store the result if not already done
183+
result[name_index as usize].name = name.split(".").map(|s| oyarn!("{}", s)).next().unwrap();
184+
result[name_index as usize].found = true;
185+
result[name_index as usize].symbol = next_symbol.as_ref().unwrap().clone();
181186
}
182187
}
183188

0 commit comments

Comments
 (0)