With Solidity Version 0.6 there were some syntactical and semantical additions/changes:
Semantical Changes:
Functions can now only be overridden when they are either marked with the virtual keyword or defined in an interface. Functions without implementation outside an interface have to be marked virtual. -> Compiler
Member-access to length of arrays is now always read-only, even for storage arrays -> Builtins need to be adapted
The names of variables declared in inline assembly may no longer end in _slot or _offset. -> Compiler
Variable declarations in inline assembly may no longer shadow any declaration outside the inline assembly block. If the name contains a dot, its prefix up to the dot may not conflict with any declaration outside the inline assembly block. -> Compiler
State variable shadowing is now disallowed. A derived contract can only declare a state variable x, if there is no visible state variable with the same name in any of its bases. -> Compiler / Scoping?
Conversions from external function types to address are now disallowed. Instead external function types have a member called address, similar to the existing selector member. -> Builtins need to be adapted
The function push(value) for dynamic storage arrays does not return the new length anymore (it returns nothing). -> Builtins need to be adapted
Conversions from address to address payable are now possible via payable(x), where x must be of type address -> Builtin need to be added
Syntactical Additions/Changes:
When overriding a function or modifier, the new keyword override must be used. When overriding a function or modifier defined in multiple parallel bases, all bases must be listed in parentheses after the keyword like so: override(Base1, Base2) -> #327
The new keyword abstract can be used to mark contracts as abstract. It has to be used if a contract does not implement all its functions. -> #326
The unnamed function commonly referred to as “fallback function” was split up into a new fallback function that is defined using the fallback keyword and a receive ether function defined using the receive keyword. -> #325
Try/Catch Statements are now introduced -> #324
struct and enum types can be declared at file level. -> #328
Extends Support for inline Assembly with Yul -> #323
With Solidity Version 0.6 there were some syntactical and semantical additions/changes:
Semantical Changes:
virtual
keyword or defined in an interface. Functions without implementation outside an interface have to be markedvirtual
. -> Compilerlength
of arrays is now always read-only, even for storage arrays -> Builtins need to be adapted_slot
or_offset
. -> Compilerx
, if there is no visible state variable with the same name in any of its bases. -> Compiler / Scoping?address
are now disallowed. Instead external function types have a member calledaddress
, similar to the existingselector
member. -> Builtins need to be adaptedpush(value)
for dynamic storage arrays does not return the new length anymore (it returns nothing). -> Builtins need to be adaptedaddress
toaddress payable
are now possible viapayable(x)
, where x must be of typeaddress
-> Builtin need to be addedSyntactical Additions/Changes:
override
must be used. When overriding a function or modifier defined in multiple parallel bases, all bases must be listed in parentheses after the keyword like so:override(Base1, Base2)
-> #327abstract
can be used to mark contracts as abstract. It has to be used if a contract does not implement all its functions. -> #326fallback
keyword and a receive ether function defined using thereceive
keyword. -> #325struct
andenum
types can be declared at file level. -> #328