mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			427 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			427 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
==== Source: s1.sol ====
 | 
						|
 | 
						|
 | 
						|
uint constant a = 89;
 | 
						|
 | 
						|
function fre() pure returns (uint) {
 | 
						|
    return a;
 | 
						|
}
 | 
						|
 | 
						|
==== Source: s2.sol ====
 | 
						|
 | 
						|
import {a as b, fre} from "s1.sol";
 | 
						|
import "s1.sol" as M;
 | 
						|
 | 
						|
uint256 constant a = 13;
 | 
						|
 | 
						|
contract C {
 | 
						|
    function f() public returns (uint, uint, uint, uint) {
 | 
						|
        return (a, fre(), M.a, b);
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
// ====
 | 
						|
// compileToEwasm: also
 | 
						|
// compileViaYul: also
 | 
						|
// ----
 | 
						|
// f() -> 0x0d, 0x59, 0x59, 0x59
 |