Open zzjas opened 3 weeks ago
A variant from #13952 might be related to this:
If we compile the following code with V2:
module 0xCAFE::Module0 {
public fun function5(var21: bool, var23: bool) {
let var67 = (&(var21) != &((var21 || var23)));
}
}
The bytecode verifier will give MOVELOC_EXISTS_BORROW_ERROR
(currently marked as known issue
).
If the order of operands is flipped, i.e.:
module 0xCAFE::Module0 {
public fun function5(var21: bool, var23: bool) {
let var67 = (&((var21 || var23)) != &(var21));
}
}
It will be compiled successfully.
Both can be compiled by V1 successfully.
π Bug
Compiler V1 can compile the following program but compiler V2 will give an error.
To reproduce
Code snippet to reproduce
Stack trace/error message V2 gives: