Evaluate constants in array repeat expression

This commit is contained in:
hkalbasi 2021-12-23 21:19:18 +03:30
parent 7b7a1ed062
commit 75c2acae6e
5 changed files with 94 additions and 27 deletions

View file

@ -1540,11 +1540,11 @@ impl Const {
let infer = infer.as_ref();
let result = eval_const(
root,
ConstEvalCtx {
&mut ConstEvalCtx {
exprs: &body.exprs,
pats: &body.pats,
local_data: HashMap::default(),
infer,
infer: &mut |x| infer[x].clone(),
},
);
result