mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			36 lines
		
	
	
		
			895 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			895 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
contract C {
 | 
						|
	function f() pure public {
 | 
						|
		require(false);
 | 
						|
		// This is not reachable.
 | 
						|
		assert(false);
 | 
						|
	}
 | 
						|
 | 
						|
	function g() pure public {
 | 
						|
		require(false, "require message");
 | 
						|
		// This is not reachable.
 | 
						|
		assert(false);
 | 
						|
	}
 | 
						|
 | 
						|
	function h(bool b) pure public {
 | 
						|
		if (b)
 | 
						|
			require(false);
 | 
						|
		assert(!b);
 | 
						|
	}
 | 
						|
 | 
						|
	// Check that arguments are evaluated.
 | 
						|
	bool x = false;
 | 
						|
	function m() view internal returns (string memory) {
 | 
						|
		assert(x != true);
 | 
						|
	}
 | 
						|
	function i() public {
 | 
						|
		x = true;
 | 
						|
		require(false, m());
 | 
						|
	}
 | 
						|
}
 | 
						|
// ====
 | 
						|
// SMTEngine: all
 | 
						|
// ----
 | 
						|
// Warning 6321: (396-409): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
 | 
						|
// Warning 6328: (415-432): CHC: Assertion violation happens here.
 | 
						|
// Info 1391: CHC: 3 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
 |