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
let mut cb = ConditionalBuilder::new(vec![type_row![]; 2], type_row![], usize_t()).unwrap();
let cst = cb.add_constant(Value::from(ConstUsize::new(29)));
let mut case0 = cb.case_builder(0).unwrap();
let c = case0.load_const(&cst);
let case0 = case0.finish_with_outputs([c]).unwrap().node();
let mut case1 = cb.case_builder(1).unwrap();
let c = case1.load_const(&cst);
let case1 = case1.finish_with_outputs([c]).unwrap().node();
let orig = cb.finish_hugr().unwrap();
I'm not really sure whether
validation should accept this Hugr; the conditional should be compiled that the first Case should be used for the first tag of the predicate, rather than "the first child"; or
ConditionalBuilder should not implement the trait defining add_constant (and all the others - e.g. local functions).
It's not useful to say you have to add all the Cases before the other scoped defns as you then wouldn't be able to use the latter.
The text was updated successfully, but these errors were encountered:
I'm not really sure whether
add_constant
(and all the others - e.g. local functions).It's not useful to say you have to add all the Cases before the other scoped defns as you then wouldn't be able to use the latter.
The text was updated successfully, but these errors were encountered: