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
What about if we instead calculate all expressions in the same manner, but allow assignments where the assigned value is a constant that fits into the assignment target, even if the static type of the expression is larger?
This would be in line with the other casting rules: A narrowing cast, but with the guarantee that no precision is lost. Comes in handy in certain edge cases, e.g. the following probably should be valid but isn't right now:
signed<4> x = -8; // UnaryMinus(IntLiteral(8) : unsigned<4>) : signed<5>
The text was updated successfully, but these errors were encountered:
@AtomCrafty suggested in #29:
This would be in line with the other casting rules: A narrowing cast, but with the guarantee that no precision is lost. Comes in handy in certain edge cases, e.g. the following probably should be valid but isn't right now:
The text was updated successfully, but these errors were encountered: