Disallow access to functions from inline assembly.

This commit is contained in:
Alexander Arlt
2020-04-01 10:34:55 +02:00
committed by chriseth
parent 3f26f7fb7e
commit 3e649eb8e1
4 changed files with 15 additions and 0 deletions
@@ -5,3 +5,5 @@ contract C {
}
}
}
// ----
// DeclarationError: (72-73): Access to functions is not allowed in inline assembly.
@@ -0,0 +1,10 @@
contract C {
function f() public pure {}
constructor() public {
assembly {
let x := f
}
}
}
// ----
// DeclarationError: (112-113): Access to functions is not allowed in inline assembly.