mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			487 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			487 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| contract D {
 | |
| 	bool b;
 | |
| 	function s() public { b = true; }
 | |
| 	function f() public view returns (bool) { return b; }
 | |
| }
 | |
| 
 | |
| contract C {
 | |
| 	D d;
 | |
| 	constructor() {
 | |
| 		d = new D();
 | |
| 	}
 | |
| 	function g() public view {
 | |
| 		assert(d.f()); // should fail
 | |
| 	}
 | |
| }
 | |
| // ====
 | |
| // SMTEngine: all
 | |
| // SMTExtCalls: trusted
 | |
| // ----
 | |
| // Warning 6328: (199-212): CHC: Assertion violation happens here.\nCounterexample:\nd = (- 1)\n\nTransaction trace:\nC.constructor()\nState: d = (- 1)\nC.g()\n    D.f() -- trusted external call
 |