github ethereum/solidity v0.2.1
Version 0.2.1

latest releases: v0.8.25, v0.8.24, v0.8.23...
8 years ago

This release includes three major features and one very important bugfix in the optimizer.

In some situations, the optimizer generated incorrect code. Please always test your code before you use it, unfortunately, we can never guarantee 100% correctness.

We are especially grateful about the many voluntary community contributions this release received.
Two fearless individuals dived deep into the solidity code and delivered two major features: Thanks a lot to @VoR0220 for the inline arrays and to @guanqun for the ternary operator!
Furthermore, @bobsummerwill spent a lot of free time handling build issues on MacOS and other platforms.
Other contributions came from @axic, @chfast, @ethers, @janx, @pipermerriam and @u2.

Features:

  • Inline arrays, i.e. var y = [1,x,f()]; if there is a common type for 1, x and f(). Note that the result is always a fixed-length memory array and conversion to dynamic-length memory arrays is not yet possible.
  • Import similar to ECMAScript6 import (import "abc.sol" as d and import {x, y} from "abc.sol"). Documentation
  • Commandline compiler solc automatically resolves missing imports and allows for "include directories". Documentation
  • Conditional / ternary operator: x ? y : z

Fixed bugs:

  • Several bugs where the optimizer generated invalid code.
  • Enums and structs were not accessible to other contracts.
  • Fixed segfault connected to function paramater types, appeared during gas estimation.
  • Type checker crash for wrong number of base constructor parameters.
  • Allow function overloads with different array types.
  • Allow assignments of type (x) = 7.
  • Type uint176 was not available.
  • Fixed crash during type checking concerning constructor calls.
  • Fixed crash during code generation concerning invalid accessors for struct types.
  • Fixed crash during code generating concerning computing a hash of a struct type.

note: The source below cannot be used without the dependent repositories.

Don't miss a new solidity release

NewReleases is sending notifications on new releases.