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