mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			253 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			253 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| contract A {
 | |
| 	uint x;
 | |
| 	constructor() {
 | |
| 		x = 42;
 | |
| 	}
 | |
| 	function f() public view returns(uint256) {
 | |
| 		return x;
 | |
| 	}
 | |
| }
 | |
| contract B is A {
 | |
| 	uint y = f();
 | |
| }
 | |
| contract C is B {
 | |
| 	function g() public view {
 | |
| 		assert(y == 42);
 | |
| 	}
 | |
| }
 | |
| // ====
 | |
| // SMTEngine: all
 | |
| // ----
 |