mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| contract C {
 | |
|     function f() public {
 | |
|         uint a = (1,2);
 | |
|         uint b = (1,2,3);
 | |
|         uint c = (1,2,3,4);
 | |
|     }
 | |
|     function g() public {
 | |
|         (uint a1, uint b1, uint c1, uint d1) = 1;
 | |
|         (uint a2, uint b2, uint c2) = 1;
 | |
|         (uint a3, uint b3) = 1;
 | |
|     }
 | |
|     function h() public {
 | |
|         (uint a1, uint b1, uint c1, uint d1) = (1,2,3);
 | |
|         (uint a2, uint b2, uint c2) = (1,2,3,4);
 | |
|     }
 | |
| }
 | |
| // ----
 | |
| // TypeError 7364: (47-61): Different number of components on the left hand side (1) than on the right hand side (2).
 | |
| // TypeError 7364: (71-87): Different number of components on the left hand side (1) than on the right hand side (3).
 | |
| // TypeError 7364: (97-115): Different number of components on the left hand side (1) than on the right hand side (4).
 | |
| // TypeError 7364: (157-197): Different number of components on the left hand side (4) than on the right hand side (1).
 | |
| // TypeError 7364: (207-238): Different number of components on the left hand side (3) than on the right hand side (1).
 | |
| // TypeError 7364: (248-270): Different number of components on the left hand side (2) than on the right hand side (1).
 | |
| // TypeError 7364: (312-358): Different number of components on the left hand side (4) than on the right hand side (3).
 | |
| // TypeError 7364: (368-407): Different number of components on the left hand side (3) than on the right hand side (4).
 |