Lower const params with a bad id

This commit is contained in:
hkalbasi 2023-06-05 14:57:19 +03:30
parent 68bdf609f3
commit a481e004b0
38 changed files with 475 additions and 184 deletions

View file

@ -2,7 +2,7 @@
use std::iter;
use crate::{lower::LowerCtx, type_ref::ConstRefOrPath};
use crate::{lower::LowerCtx, type_ref::ConstRef};
use either::Either;
use hir_expand::name::{name, AsName};
@ -217,7 +217,7 @@ pub(super) fn lower_generic_args(
}
}
ast::GenericArg::ConstArg(arg) => {
let arg = ConstRefOrPath::from_expr_opt(arg.expr());
let arg = ConstRef::from_expr_opt(lower_ctx, arg.expr());
args.push(GenericArg::Const(arg))
}
}