()
| 2548 | |
| 2549 | #[test] |
| 2550 | fn anyref_ty_extern_converted() -> Result<()> { |
| 2551 | let mut store = gc_store()?; |
| 2552 | // ExternRef converted to AnyRef has HeapType::Any |
| 2553 | let ext = ExternRef::new(&mut store, 42u32)?; |
| 2554 | let any = AnyRef::convert_extern(&mut store, ext)?; |
| 2555 | let ty = any.ty(&store)?; |
| 2556 | assert!(matches!(ty, HeapType::Any)); |
| 2557 | Ok(()) |
| 2558 | } |
| 2559 | |
| 2560 | #[test] |
| 2561 | fn anyref_to_raw_struct() -> Result<()> { |