Description
Created by @marcoeilers on 2017-06-28 13:36
Last updated on 2017-11-27 14:28
Silver currently interprets "/" as a division resulting in a permission, and "" as integer division. Since "/" is the normal division operator people know from other languages, it would be preferable if it could also be used for integer division. The type checker can figure out which one is meant from the expected type of the expression.
However, in some expressions, the type is ambiguous (e.g. (1/2) * (2/1), this could either be equal to a full permission or to zero). In these cases, the user needs to be able to reliably get the result they want. The type checker should therefore default to a perm-expression if both options are valid, and the user can simply use the old "" operator in these cases (which we might want to keep anyway for backwards compatibility).