diff --git a/src/front/wgsl/lower/construction.rs b/src/front/wgsl/lower/construction.rs index 12e30d28de..d02826834c 100644 --- a/src/front/wgsl/lower/construction.rs +++ b/src/front/wgsl/lower/construction.rs @@ -466,20 +466,18 @@ impl<'source, 'temp> Lowerer<'source, 'temp> { crate::Expression::Compose { ty, components } } - // Array constructor - (components, ConcreteConstructor::Type(ty, &crate::TypeInner::Array { .. })) => { + // Array or Struct constructor + ( + components, + ConcreteConstructor::Type( + ty, + &crate::TypeInner::Array { .. } | &crate::TypeInner::Struct { .. }, + ), + ) => { let components = components.into_components_vec(); crate::Expression::Compose { ty, components } } - // Struct constructor - (components, ConcreteConstructor::Type(ty, &crate::TypeInner::Struct { .. })) => { - crate::Expression::Compose { - ty, - components: components.into_components_vec(), - } - } - // ERRORS // Bad conversion (type cast)