Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
Signed-off-by: shruti2522 <[email protected]>
  • Loading branch information
shruti2522 committed Jul 4, 2024
1 parent 2123149 commit 64bb5cc
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions kclvm/sema/src/advanced_resolver/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1288,23 +1288,24 @@ impl<'ctx> AdvancedResolver<'ctx> {
}
for (i, arg) in args.iter().enumerate() {
self.expr(arg)?;
if with_hint {
let (start_pos, end_pos) = arg.get_span_pos();
let value = self.gs.get_symbols_mut().alloc_value_symbol(
ValueSymbol::new(params[i].name.clone(), start_pos, end_pos, None, false),
self.ctx.get_node_key(&arg.id),
self.ctx.current_pkgpath.clone().unwrap(),
);
if let Some(value) = self.gs.get_symbols_mut().values.get_mut(value.get_id()) {
let ty = self
.ctx
.node_ty_map
.borrow()
.get(&self.ctx.get_node_key(&arg.id))
.map(|ty| ty.clone());
let (start_pos, end_pos) = arg.get_span_pos();
let value = self.gs.get_symbols_mut().alloc_value_symbol(
ValueSymbol::new(params[i].name.clone(), start_pos, end_pos, None, false),
self.ctx.get_node_key(&arg.id),
self.ctx.current_pkgpath.clone().unwrap(),
);

if let Some(value) = self.gs.get_symbols_mut().values.get_mut(value.get_id()) {
let ty = self
.ctx
.node_ty_map
.borrow()
.get(&self.ctx.get_node_key(&arg.id))
.map(|ty| ty.clone());
if with_hint {
value.hint = Some(SymbolHint::VarHint(params[i].name.clone()));
value.sema_info = SymbolSemanticInfo { ty, doc: None };
}
value.sema_info = SymbolSemanticInfo { ty, doc: None };
}
}

Expand Down

0 comments on commit 64bb5cc

Please sign in to comment.