weiroll / weiroll.js

A high-level javascript transpiler for weiroll
https://weiroll.github.io/weiroll.js/
MIT License
52 stars 10 forks source link

Implement type coercion rules #2

Open Arachnid opened 3 years ago

Arachnid commented 3 years ago

Right now we simply fail if you try and pass a return value of one type as an argument to another function, but we should probably understand that some types of casts (like bytes to string and bytes32 to uint256) are okay. Or we could demand explicit typecasts for types that are binary-compatible, for safety?

BlinkyStitt commented 2 years ago

explicit typecasts sounds safest to me. Solidity itself has gone that route.