mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Merge pull request #10621 from ethereum/smt_fix_breaking_again
SMTChecker fix breaking again
This commit is contained in:
		
						commit
						b764e06c76
					
				| @ -9,8 +9,8 @@ contract C { | ||||
| 		assert(b[length - 1] == 0); | ||||
| 		assert(b[length - 1] == b[length - 2]); | ||||
| 		// Fails | ||||
| 		assert(b[length - 1] == byte(uint8(1))); | ||||
| 		assert(b[length - 1] == bytes1(uint8(1))); | ||||
| 	} | ||||
| } | ||||
| // ---- | ||||
| // Warning 6328: (236-275): CHC: Assertion violation happens here.\nCounterexample:\nb = [0, 0]\n\n\n\nTransaction trace:\nconstructor()\nState: b = []\nf() | ||||
| // Warning 6328: (236-277): CHC: Assertion violation happens here.\nCounterexample:\nb = [0, 0]\n\n\n\nTransaction trace:\nconstructor()\nState: b = []\nf() | ||||
|  | ||||
| @ -5,18 +5,18 @@ contract C { | ||||
| 
 | ||||
| 	function f() public { | ||||
| 		require(b.length == 0); | ||||
| 		b.push() = byte(uint8(1)); | ||||
| 		assert(b[0] == byte(uint8(1))); | ||||
| 		b.push() = bytes1(uint8(1)); | ||||
| 		assert(b[0] == bytes1(uint8(1))); | ||||
| 	} | ||||
| 
 | ||||
| 	function g() public { | ||||
| 		byte one = byte(uint8(1)); | ||||
| 		bytes1 one = bytes1(uint8(1)); | ||||
| 		b.push() = one; | ||||
| 		assert(b[b.length - 1] == one); | ||||
| 		// Fails | ||||
| 		assert(b[b.length - 1] == byte(uint8(100))); | ||||
| 		assert(b[b.length - 1] == bytes1(uint8(100))); | ||||
| 	} | ||||
| 
 | ||||
| } | ||||
| // ---- | ||||
| // Warning 6328: (290-333): CHC: Assertion violation happens here.\nCounterexample:\nb = [1]\n\n\n\nTransaction trace:\nconstructor()\nState: b = []\ng() | ||||
| // Warning 6328: (298-343): CHC: Assertion violation happens here.\nCounterexample:\nb = [1]\n\n\n\nTransaction trace:\nconstructor()\nState: b = []\ng() | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user