flintrocks / flint

The Flint Programming Language for Smart Contracts
MIT License
2 stars 0 forks source link

Implement casting parsing #91

Closed nvgrw closed 5 years ago

nvgrw commented 5 years ago

Allow casting between types in external calls.

Add the as! construct that checks that the value is in bounds and crashes the program if not. We do this through an inequality check on the values where casting is required. Add semantic checks to prevent non-sensical casts, like non-integer types to integers and back. We mostly want these casts to convert between Integers of different sizes.

Reference #73