Skip to content

Commit b4f81b7

Browse files
try fix.
1 parent f1abe3d commit b4f81b7

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

crates/move-prover-boogie-backend/src/boogie_backend/bytecode_translator.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3900,13 +3900,10 @@ impl<'env> FunctionTranslator<'env> {
39003900
)
39013901
{
39023902
// Check if callee has $pure variant available
3903-
let callee_has_pure =
3904-
self.parent.targets.is_pure_fun(&QualifiedId {
3905-
module_id: *mid,
3906-
id: *fid,
3907-
});
3908-
3909-
if callee_has_pure {
3903+
if self.parent.targets.is_pure_fun(&QualifiedId {
3904+
module_id: *mid,
3905+
id: *fid,
3906+
}) {
39103907
fun_name = format!("{}{}", fun_name, "$pure");
39113908
} else {
39123909
// Fallback to $impl if no $pure available
@@ -3915,7 +3912,18 @@ impl<'env> FunctionTranslator<'env> {
39153912
} else if self.style == FunctionTranslationStyle::SpecNoAbortCheck {
39163913
fun_name = format!("{}{}", fun_name, "$opaque");
39173914
} else if self.style == FunctionTranslationStyle::Opaque {
3918-
let suffix = if use_impl { "$impl" } else { "$opaque" };
3915+
let suffix = if use_impl {
3916+
if self.parent.targets.is_pure_fun(&QualifiedId {
3917+
module_id: *mid,
3918+
id: *fid,
3919+
}) {
3920+
"$pure"
3921+
} else {
3922+
"$impl"
3923+
}
3924+
} else {
3925+
"$opaque"
3926+
};
39193927
fun_name = format!("{}{}", fun_name, suffix);
39203928
}
39213929
} else if !is_spec_call && use_func && callee_is_pure {

0 commit comments

Comments
 (0)