mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow RETURNDATASIZE and RETURNDATACOPY in inline assembly blocks in pure functions
(cherry picked from commit f567eb1fb2)
quick fix to pass failing test at ./test/externalTests/ens.sh (line 80) -- Should be removed when 0.9 is released.
This commit is contained in:
committed by
Matheus Aguiar
parent
00fb31c8cc
commit
7f4f655cca
@@ -1,5 +1,5 @@
|
||||
contract C {
|
||||
function f() pure external {
|
||||
function f() view external {
|
||||
assembly {
|
||||
let s := returndatasize()
|
||||
returndatacopy(0, 0, s)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
contract C {
|
||||
function f() pure external {
|
||||
function f() view external {
|
||||
assembly {
|
||||
let s := returndatasize()
|
||||
returndatacopy(0, 0, s)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
function f() public view {
|
||||
uint returndatasize;
|
||||
returndatasize;
|
||||
assembly {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
function f() public view {
|
||||
uint returndatasize;
|
||||
returndatasize;
|
||||
assembly {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
contract C { function f() public pure { uint returndatasize; returndatasize; assembly { pop(returndatasize()) }}}
|
||||
contract C { function f() public view { uint returndatasize; returndatasize; assembly { pop(returndatasize()) }}}
|
||||
// ====
|
||||
// EVMVersion: =homestead
|
||||
// ----
|
||||
|
||||
Reference in New Issue
Block a user