[Sol->Yul] Supporting .runtimeCode

This commit is contained in:
Djordje Mijovic
2020-07-21 17:56:37 +02:00
parent 6f97e6153c
commit 546e9af24d
3 changed files with 9 additions and 9 deletions
@@ -10,18 +10,18 @@ contract D {
}
}
contract C {
function test() public returns (uint256) {
D d = new D();
bytes32 hash;
assembly { hash := extcodehash(d) }
assert(hash == keccak256(type(D).runtimeCode));
return 42;
D d = new D();
bytes32 hash;
assembly { hash := extcodehash(d) }
assert(hash == keccak256(type(D).runtimeCode));
return 42;
}
}
// ====
// EVMVersion: >=constantinople
// compileViaYul: also
// ----
// test() -> 42