You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using shift operations, the shift value currently has to match the result type.
// works
let shift256: UInt256 = 240
let result: UInt256 = 1 << shift256
// errors
let shift8: UInt8 = 240
result = 1 << shift8
Although there is no harm in the current way, this is a constraint that the parser could remove since the values of shift are much smaller than the result of the operation.
Suggested Solution
For a backward compatible change, we can remove the condition for the shift value to be of the same type of the result. The shift value can be a positive integer of any size.
The text was updated successfully, but these errors were encountered:
Issue to be solved
When using shift operations, the shift value currently has to match the result type.
Although there is no harm in the current way, this is a constraint that the parser could remove since the values of shift are much smaller than the result of the operation.
Suggested Solution
For a backward compatible change, we can remove the condition for the shift value to be of the same type of the result. The shift value can be a positive integer of any size.
The text was updated successfully, but these errors were encountered: