mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	- corrected delete in case we have more than one locals
- added a test
This commit is contained in:
		
							parent
							
								
									dc30fb6385
								
							
						
					
					
						commit
						037d9a7528
					
				| @ -847,15 +847,17 @@ BOOST_AUTO_TEST_CASE(deleteLocals) | ||||
| { | ||||
| 	char const* sourceCode = R"( | ||||
| 		contract test { | ||||
| 			function delLocal() returns (uint res){ | ||||
| 			function delLocal() returns (uint res1, uint res2){ | ||||
| 				uint v = 5; | ||||
| 				uint w = 6; | ||||
| 				uint x = 7; | ||||
| 				delete v; | ||||
| 				res = w; | ||||
| 				res1 = w; | ||||
| 				res2 = x; | ||||
| 			} | ||||
| 		})"; | ||||
| 	compileAndRun(sourceCode); | ||||
| 	BOOST_CHECK(callContractFunction("delLocal()") == encodeArgs(6)); | ||||
| 	BOOST_CHECK(callContractFunction("delLocal()") == encodeArgs(6, 7)); | ||||
| } | ||||
| 
 | ||||
| BOOST_AUTO_TEST_CASE(constructor) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user