Skip to content

Commit

Permalink
Update lower.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Mar 18, 2024
1 parent fec8c45 commit 05fedc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/erg_compiler/lower.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@ impl<A: ASTBuildable> GenericASTLowerer<A> {
let var_params = var_params.first().map(|(name, vi)| {
ParamTy::pos_or_kw(
name.as_ref().map(|n| n.inspect().clone()),
vi.t.inner_ts().remove(0),
vi.t.inner_ts().first().map_or(Type::Obj, |t| t.clone()),
)
});
(var_params, non_default_params.into_iter())
Expand All @@ -1797,7 +1797,7 @@ impl<A: ASTBuildable> GenericASTLowerer<A> {
let var_params = var_params.get(0).map(|(name, vi)| {
ParamTy::pos_or_kw(
name.as_ref().map(|n| n.inspect().clone()),
vi.t.inner_ts().remove(0),
vi.t.inner_ts().first().map_or(Type::Obj, |t| t.clone()),
)
});
let non_default_params = non_default_params.into_iter().filter(|(name, _)| {
Expand Down

0 comments on commit 05fedc3

Please sign in to comment.