| 2922 | |
| 2923 | #[test] |
| 2924 | fn anyref_ty_array() -> Result<()> { |
| 2925 | let mut store = gc_store()?; |
| 2926 | let array_ty = ArrayType::new( |
| 2927 | store.engine(), |
| 2928 | FieldType::new(Mutability::Const, ValType::I32.into()), |
| 2929 | ); |
| 2930 | let pre = ArrayRefPre::new(&mut store, array_ty); |
| 2931 | let a = ArrayRef::new(&mut store, &pre, &Val::I32(0), 1)?; |
| 2932 | let any: Rooted<AnyRef> = a.into(); |
| 2933 | let ty = any.ty(&store)?; |
| 2934 | assert!(matches!(ty, HeapType::ConcreteArray(_))); |
| 2935 | Ok(()) |
| 2936 | } |
| 2937 | |
| 2938 | #[test] |
| 2939 | fn eqref_ty_i31() -> Result<()> { |