Skip to content

v0.5.1

Compare
Choose a tag to compare
@cd1m0 cd1m0 released this 26 May 08:00
· 393 commits to develop since this release

This release brings:

  1. Quantification over numeric ranges/arrays:

    The language now has a forall construct that allows to compute a universally quantified expression over numeric ranges/indices in an array. For example:

forall (uint x in 5...10) x >0

Is a predicate that evalutes to true IFF for all values in the range from 5 (inclusive) to 10 (exclusive), its true that they are positive. (which is obviously true). Since iterating over arrays is a common use-case for this construct we have the following syntactic shortcut:

forall (uint i in arr) arr[i] > 0

The above expression is equivalent to the following form:

forall (uint i in 0...arr.length) arr[i] > 0

  1. Fix a bug which produces invalid code when instrumenting a constructor in Solidity 0.8.x