When decompiling a cast it seems that the outer parentheses are optimised away.
Example:
fun test(a: u64): u256 {
(a as u256)
}
// decompiles to
fun test(arg0: u64) : u256 {
arg0 as u256
}
When a cast is not the outer operator it is decompiled correctly:
fun test(a: u64): u256 {
((a as u128) as u256)
}
// decompiles to
fun test(arg0: u64) : u256 {
(arg0 as u128) as u256
}
When decompiling a
castit seems that the outer parentheses are optimised away.Example:
When a cast is not the outer operator it is decompiled correctly: