Skip to content

Commit 28eb496

Browse files
authored
Merge pull request RustPython#1233 from RustPython/revert-1225-coolreader18/nested-boolops
Revert "Fix compilation of nested boolean operations"
2 parents f51b686 + fb5ebea commit 28eb496

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/src/compile.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,9 +1303,11 @@ impl<O: OutputStream> Compiler<O> {
13031303
self.emit(Instruction::Pop);
13041304
}
13051305
if let Some(false_label) = false_label {
1306+
self.emit(Instruction::Duplicate);
13061307
self.emit(Instruction::JumpIfFalse {
13071308
target: false_label,
13081309
});
1310+
self.emit(Instruction::Pop);
13091311
}
13101312
}
13111313
}

0 commit comments

Comments
 (0)