Rework generate_raw to avoid need to intern in prop tests
Also, this commit makes `apply_term` automatically re-intern the program since it isn't safe to apply any term onto a UPLC program. In particular, terms that introduce new let-bindings (via lambdas) will mess with the already generated DeBruijn indices. The problem doesn't occur for pure constant terms like Data. So we still have a safe and fast version 'apply_data' when needed.
This commit is contained in:
@@ -49,7 +49,7 @@ fn assert_uplc(source_code: &str, expected: Term<Name>, should_fail: bool) {
|
||||
|
||||
match &script.2 {
|
||||
TestType::Func(Function { body: func, .. }) => {
|
||||
let program = generator.generate_raw(func, &script.1);
|
||||
let program = generator.generate_raw(func, &[], &script.1);
|
||||
|
||||
let debruijn_program: Program<DeBruijn> = program.try_into().unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user