You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Failing test case, similar to array_op::tests::test_get.
#[test]/// Initialize an array operation where the element type is not from the prelude.fntest_non_prelude_op(){let size = 2;let element_ty = float64_type();let op = ArrayOpDef::get.to_concrete(element_ty.clone(), size);let optype:OpType = op.into();let sig = optype.dataflow_signature().unwrap();assert_eq!(
sig.io(),(&vec![array_type(size, element_ty.clone()), usize_t()].into(),&vec![option_type(element_ty.clone()).into()].into()));}
This should get fixed if we remove the extension registries from validation.
The text was updated successfully, but these errors were encountered:
Collects and resolves extensions in the types stored inside a `Value`.
This includes the specified type of a `Sum` and other cached types.
Since we expect `CustomConst`'s `get_type` method to always return
signatures computed by a binary definition, I'd say we close#1742 as
not needed.
For some reason there's a random test on `hugr-py` that starts failing
when we enable this:
```
=================================== FAILURES ===================================
______________________________ test_higher_order _______________________________
Error parsing package: Error resolving opaque operation: Error in signature of operation 'prelude.Noop' in Node(3): Type arguments of node did not match params declared by definition: Wrong number of type arguments: 0 vs expected 1 declared type parameters
```
The fix for #1774 that I'm submitting immediately after this PR fixes it
so I'm skipping the test in this PR 🤷
I'll open an issue to investigate further after we make the release
---------
Co-authored-by: Seyon Sivarajah <[email protected]>
Now that we keep references to the extensions used around the hugr, we
no longer need to pass `ExtensionRegistry`es when calling `validate` on
ops, types, etc. This PR removes most uses of the registries.
drive-by: Fix `Noop` not declaring its type argument in `hugr-py`.
Closes#1774; now that the type carries its extension we can instantiate
`Array`s with any element type.
BREAKING CHANGE: Removed the extension registry argument from `validate`
calls.
BREAKING CHANGE: Removed the extension registry argument from operation
instantiation methods.
BREAKING CHANGE: Removed most extension-specific test registries. Use
`EMPTY_REG`, `PRELUDE_REGISTRY`, or `STD_REG` instead.
Failing test case, similar to
array_op::tests::test_get
.This should get fixed if we remove the extension registries from validation.
The text was updated successfully, but these errors were encountered: