re-introduce code-gen patch, but with a test.
Actually, this has been a bug for a long time it seems. Calling any prelude functions using a qualified import would result in a codegen crash. Whoopsie. This is now fixed as shown by the regression test.
This commit is contained in:
@@ -7003,3 +7003,25 @@ fn bls12_381_elements_from_data_conversion() {
|
||||
false,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn qualified_prelude_functions() {
|
||||
let src = r#"
|
||||
use aiken
|
||||
|
||||
test foo() {
|
||||
aiken.identity(True) && identity(True)
|
||||
}
|
||||
"#;
|
||||
|
||||
let constant_true = Term::Constant(Constant::Bool(true).into());
|
||||
let constant_false = Term::Constant(Constant::Bool(false).into());
|
||||
|
||||
assert_uplc(
|
||||
src,
|
||||
constant_true
|
||||
.clone()
|
||||
.delayed_if_then_else(constant_true, constant_false),
|
||||
false,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user