Skip to content

Commit

Permalink
chore: remove unused code
Browse files Browse the repository at this point in the history
Signed-off-by: he1pa <[email protected]>
  • Loading branch information
He1pa committed May 24, 2024
1 parent 8024feb commit 038bffe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions kclvm/sema/src/advanced_resolver/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ impl<'ctx> MutSelfTypedResultWalker<'ctx> for AdvancedResolver<'ctx> {
}
self.walk_type_expr(assign_stmt.ty.as_ref().map(|ty| ty.as_ref()))?;
self.expr(&assign_stmt.value)?;
if !assign_stmt.targets.is_empty() {
self.ctx.schema_symbol_stack.pop();
};
Ok(None)
}

Expand Down
4 changes: 3 additions & 1 deletion kclvm/sema/src/resolver/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1270,12 +1270,14 @@ impl<'ctx> Resolver<'ctx> {
self.ctx.start_pos = start;
self.ctx.end_pos = end;
}
let ty = self.walk_expr(&expr.node);

let expected_ty = match self.ctx.config_expr_context.last() {
Some(ty) => ty.clone().map(|o| o.ty),
None => None,
};

let ty = self.walk_expr(&expr.node);

if let Some(expected_ty) = expected_ty {
let upgrade_ty =
self.upgrade_dict_to_schema(ty.clone(), expected_ty, &expr.get_span_pos());
Expand Down

0 comments on commit 038bffe

Please sign in to comment.