Skip to content
Snippets Groups Projects

Misc. improvements

Merged rarbore2 requested to merge misc into main
+ 4
4
@@ -743,15 +743,15 @@ impl Constant {
}
pub fn try_array_type(&self, types: &[Type]) -> Option<TypeID> {
// Need types, since zero initializer may be for a collection type, ro
// Need types, since zero initializer may be for a collection type, or
// not.
match self {
Constant::Array(ty, _) => Some(*ty),
Constant::Zero(ty) => {
if types[ty.idx()].is_primitive() {
None
} else {
if types[ty.idx()].is_array() {
Some(*ty)
} else {
None
}
}
_ => None,
Loading