mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			563 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			563 B
		
	
	
	
		
			Solidity
		
	
	
	
	
	
| // SPDX-License-Identifier: UNLICENSED
 | |
| pragma solidity >=0.8.0;
 | |
| 
 | |
| contract MyContract
 | |
| {
 | |
|     constructor()
 | |
|     {
 | |
|         uint unused; // [Warning 2072] Unused local variable.
 | |
|    //   ^^^^^^^^^^^ @unusedVariable
 | |
|     }
 | |
| }
 | |
| 
 | |
| contract D
 | |
| {
 | |
|     function main() public payable returns (uint)
 | |
|                                        //   ^^^^ @unusedReturnVariable
 | |
|     {
 | |
|         MyContract c = new MyContract();
 | |
|    //   ^^^^^^^^^^^^ @unusedContractVariable
 | |
|     }
 | |
| }
 | |
| // ----
 | |
| // publish_diagnostics_1: @unusedReturnVariable 6321 @unusedVariable 2072 @unusedContractVariable 2072
 |