We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2412182 commit 4ef8622Copy full SHA for 4ef8622
1 file changed
packages/utils/src/types.ts
@@ -93,8 +93,8 @@ export function explicitlyCastable(from?: Type, to?: Type): boolean {
93
}
94
95
if (from instanceof BytesType) {
96
- // Can cast unbounded bytes or <=4 bytes to int
97
- if (to === PrimitiveType.INT) return !from.bound || from.bound <= 8;
+ // Can cast any bytes to int
+ if (to === PrimitiveType.INT) return true;
98
// Can't cast bytes to bool or string
99
if (to === PrimitiveType.BOOL) return false;
100
if (to === PrimitiveType.STRING) return false;
0 commit comments