Fix use of uninitialized functions stored in storage.

This commit is contained in:
chriseth
2019-04-25 15:40:48 +02:00
parent eac0048176
commit 5b991c1e59
8 changed files with 150 additions and 0 deletions
@@ -0,0 +1,23 @@
contract C {
function() internal storedFn;
bool flag;
constructor() public {
if (!flag) {
flag = true;
function() internal invalid;
storedFn = invalid;
storedFn();
}
}
function f() public pure {}
}
contract Test {
function f() public {
new C();
}
}
// ----
// f() -> FAILURE