mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Adding test for deleting packed storage array.
This commit is contained in:
		
							parent
							
								
									aa23ebc8e6
								
							
						
					
					
						commit
						03eeb49a66
					
				| @ -0,0 +1,18 @@ | ||||
| contract C { | ||||
|     uint120[] data; | ||||
| 
 | ||||
|     function f() public returns (uint120, uint120, uint120) { | ||||
|         data.push(123); | ||||
|         data.push(234); | ||||
|         data.push(345); | ||||
|         delete data; | ||||
|         assembly { | ||||
|             sstore(data.slot, 3) | ||||
|         } | ||||
|         return (data[0], data[1], data[2]); | ||||
|     } | ||||
| } | ||||
| // ==== | ||||
| // compileViaYul: also | ||||
| // ---- | ||||
| // f() -> 0, 0, 0 | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user