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 8, 2024
1 parent 8244340 commit 51ca5ff
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
20 changes: 16 additions & 4 deletions kclvm/sema/src/advanced_resolver/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1292,17 +1292,29 @@ impl<'ctx> AdvancedResolver<'ctx> {
} else {
for (arg, param) in args.iter().zip(func_ty.params.iter()) {
self.expr(arg)?;

let symbol_data = self.gs.get_symbols_mut();

if let Some(arg_ref) = symbol_data
.symbols_info
.node_symbol_map
.get(&self.ctx.get_node_key(&arg.id))
{
if let Some(value) = symbol_data.values.get_mut(arg_ref.get_id()) {
if with_hint {
value.hint = Some(SymbolHint::VarHint(param.name.clone()));
match arg_ref.get_kind() {
crate::core::symbol::SymbolKind::Value => {
if let Some(value) = symbol_data.values.get_mut(arg_ref.get_id()) {
if with_hint {
value.hint = Some(SymbolHint::VarHint(param.name.clone()));
}
}
}
crate::core::symbol::SymbolKind::Expression => {
if let Some(expr) = symbol_data.exprs.get_mut(arg_ref.get_id()) {
if with_hint {
expr.hint = Some(SymbolHint::VarHint(param.name.clone()));
}
}
}
_ => {}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions kclvm/sema/src/core/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1959,6 +1959,7 @@ pub struct ExpressionSymbol {
pub(crate) name: String,

pub(crate) sema_info: SymbolSemanticInfo,
pub(crate) hint: Option<SymbolHint>,
}

impl Symbol for ExpressionSymbol {
Expand Down Expand Up @@ -2072,6 +2073,7 @@ impl ExpressionSymbol {
end,
sema_info: SymbolSemanticInfo::default(),
owner,
hint: None,
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ func = lambda x, y, z{
x * y + z
}

z = func(a, 1, z = 2)
value = func(a, 1, z = 2)

0 comments on commit 51ca5ff

Please sign in to comment.