mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
19 lines
383 B
Solidity
19 lines
383 B
Solidity
contract C {
|
|
function testFunction() external {}
|
|
|
|
function testYul(address newAddress) view public returns (address adr) {
|
|
function() external fp = this.testFunction;
|
|
|
|
assembly {
|
|
fp.address := newAddress
|
|
}
|
|
|
|
return fp.address;
|
|
}
|
|
}
|
|
// ====
|
|
// compileViaYul: also
|
|
// ----
|
|
// testYul(address): 0x1234567890 -> 0x1234567890
|
|
// testYul(address): 0xC0FFEE3EA7 -> 0xC0FFEE3EA7
|