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
The type() expressions in Solidity return some information about the type argument. This information is dependent on what the argument is (see the documentation). The binding rules already bind to different built-in types depending on the argument, using special case rules and @type guarded paths in the stack graph (see the rules here).
Both for integer types and enums though, the .min and .max fields should bind to the argument type, but they are currently fixed in the built-in definitions as uint. This would be ideally expressed through generic types, but since Solidity does not support them, it's not possible to encode the desired behaviour in the built-ins. For cases like this, we need to encode the return type in the binding rules themselves. For example, binding of array's push() which returns a reference to the pushed element is implemented here.
To avoid later conflicts, this should be implemented on top of #1149.
The text was updated successfully, but these errors were encountered:
The
type()
expressions in Solidity return some information about the type argument. This information is dependent on what the argument is (see the documentation). The binding rules already bind to different built-in types depending on the argument, using special case rules and@type
guarded paths in the stack graph (see the rules here).Both for integer types and enums though, the
.min
and.max
fields should bind to the argument type, but they are currently fixed in the built-in definitions asuint
. This would be ideally expressed through generic types, but since Solidity does not support them, it's not possible to encode the desired behaviour in the built-ins. For cases like this, we need to encode the return type in the binding rules themselves. For example, binding of array'spush()
which returns a reference to the pushed element is implemented here.To avoid later conflicts, this should be implemented on top of #1149.
The text was updated successfully, but these errors were encountered: