fix OOB typifier indexing

This commit is contained in:
teoxoy
2023-10-19 18:08:54 +02:00
committed by Jim Blandy
parent af26d77ce4
commit 29ca53148d

View File

@@ -1707,6 +1707,7 @@ impl<'source, 'temp> Lowerer<'source, 'temp> {
crate::TypeInner::Scalar { kind, .. } => kind,
crate::TypeInner::Vector { kind, .. } => kind,
_ => {
ctx.grow_types(expr)?;
let ty = &ctx.typifier()[expr];
return Err(Error::BadTypeCast {
from_type: ctx.format_type_resolution(ty),