When we construct a WitnessNode using WitnessNode::witness we can provide a witness. However, this constructor passes through to types::Arrow::witness(NoWitness); i.e., it does not constrain the target type of the witness node based on the type of the witness data.
This allows the construction of broken programs even when pruning is otherwise done correctly.
When we construct a WitnessNode using
WitnessNode::witness
we can provide a witness. However, this constructor passes through totypes::Arrow::witness(NoWitness)
; i.e., it does not constrain the target type of the witness node based on the type of the witness data.This allows the construction of broken programs even when pruning is otherwise done correctly.