diff --git a/melior/src/ir/type/mem_ref.rs b/melior/src/ir/type/mem_ref.rs index ec668abfa5..4815be9e5c 100644 --- a/melior/src/ir/type/mem_ref.rs +++ b/melior/src/ir/type/mem_ref.rs @@ -96,6 +96,21 @@ mod tests { ); } + #[test] + fn dynamic_dimension() { + let context = Context::new(); + + assert_eq!( + Type::from(MemRefType::new( + Type::float64(&context), + &[i64::MIN], + None, + None, + )), + Type::parse(&context, "memref").unwrap() + ); + } + #[test] fn layout() { let context = Context::new();