Contract level checker: Disallow free function redefinition and alias

shadowing another free function

Co-authored-by: chriseth <chris@ethereum.org>
This commit is contained in:
Bhargava Shastry
2020-09-25 17:09:58 +02:00
co-authored by chriseth
parent 1cc0d642e8
commit e2a2276272
45 changed files with 564 additions and 17 deletions
+8
View File
@@ -1,4 +1,12 @@
[
{
"name": "FreeFunctionRedefinition",
"summary": "The compiler does not flag an error when two or more free functions with the same name and parameter types are defined in a source unit or when an imported free function alias shadows another free function with a different name but identical parameter types.",
"description": "In contrast to functions defined inside contracts, free functions with identical names and parameter types did not create an error. Both definition of free functions with identical name and parameter types and an imported free function with an alias that shadows another function with a different name but identical parameter types were permitted due to which a call to either the multiply defined free function or the imported free function alias within a contract led to the execution of that free function which was defined first within the source unit. Subsequently defined identical free function definitions were silently ignored and their code generation was skipped.",
"introduced": "0.7.1",
"fixed": "0.7.2",
"severity": "low"
},
{
"name": "UsingForCalldata",
"summary": "Function calls to internal library functions with calldata parameters called via ``using for`` can result in invalid data being read.",