mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Implement address(...).code in the IR
This commit is contained in:
committed by
Alex Beregszaszi
parent
7b347b9ec2
commit
baaf7c0db8
@@ -12,8 +12,6 @@ contract C {
|
||||
function g() public view returns (uint) { return address(0).code.length; }
|
||||
function h() public view returns (uint) { return address(1).code.length; }
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: false
|
||||
// ----
|
||||
// constructor() ->
|
||||
// initCode() -> 0x20, 0
|
||||
|
||||
@@ -13,7 +13,7 @@ contract C {
|
||||
function g() public returns (uint) { return address(new A()).code.length; }
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: false
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 0x20, 0x20, 0x48aa5566000000
|
||||
// g() -> 0x20
|
||||
|
||||
Reference in New Issue
Block a user