Skip to content

Commit e81706d

Browse files
fix(const_eval): allow casts from AbstractInt to itself
1 parent 9046b43 commit e81706d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

naga/src/proc/constant_evaluator.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,6 +1845,10 @@ impl<'a> ConstantEvaluator<'a> {
18451845
Literal::AbstractFloat(v) => v,
18461846
_ => return make_error(),
18471847
}),
1848+
Sc::ABSTRACT_INT => Literal::AbstractInt(match literal {
1849+
Literal::AbstractInt(v) => v,
1850+
_ => return make_error(),
1851+
}),
18481852
_ => {
18491853
log::debug!("Constant evaluator refused to convert value to {target:?}");
18501854
return make_error();

0 commit comments

Comments
 (0)