mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Fix error reporting source code format
This commit is contained in:
		
							parent
							
								
									5e46ef7df5
								
							
						
					
					
						commit
						7e1835af71
					
				| @ -220,7 +220,9 @@ void ContractLevelChecker::checkAbstractDefinitions(ContractDefinition const& _c | |||||||
| 		for (auto declaration: _contract.annotation().unimplementedDeclarations) | 		for (auto declaration: _contract.annotation().unimplementedDeclarations) | ||||||
| 			ssl.append("Missing implementation: ", declaration->location()); | 			ssl.append("Missing implementation: ", declaration->location()); | ||||||
| 		m_errorReporter.typeError( | 		m_errorReporter.typeError( | ||||||
| 			3656_error,_contract.location(), ssl, | 			3656_error, | ||||||
|  | 			_contract.location(), | ||||||
|  | 			ssl, | ||||||
| 			"Contract \"" + _contract.annotation().canonicalName | 			"Contract \"" + _contract.annotation().canonicalName | ||||||
| 			+ "\" should be marked as abstract."); | 			+ "\" should be marked as abstract."); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -291,7 +291,8 @@ bool SyntaxChecker::visit(ContractDefinition const& _contract) | |||||||
| 	for (FunctionDefinition const* function: _contract.definedFunctions()) | 	for (FunctionDefinition const* function: _contract.definedFunctions()) | ||||||
| 		if (function->name() == contractName) | 		if (function->name() == contractName) | ||||||
| 			m_errorReporter.syntaxError( | 			m_errorReporter.syntaxError( | ||||||
| 				5796_error,function->location(), | 				5796_error, | ||||||
|  | 				function->location(), | ||||||
| 				"Functions are not allowed to have the same name as the contract. " | 				"Functions are not allowed to have the same name as the contract. " | ||||||
| 				"If you intend this to be a constructor, use \"constructor(...) { ... }\" to define it." | 				"If you intend this to be a constructor, use \"constructor(...) { ... }\" to define it." | ||||||
| 			); | 			); | ||||||
|  | |||||||
| @ -493,7 +493,8 @@ bool TypeChecker::visit(VariableDeclaration const& _variable) | |||||||
| 					unsupportedTypes.emplace_back(param->toString()); | 					unsupportedTypes.emplace_back(param->toString()); | ||||||
| 			if (!unsupportedTypes.empty()) | 			if (!unsupportedTypes.empty()) | ||||||
| 				m_errorReporter.typeError( | 				m_errorReporter.typeError( | ||||||
| 					2763_error,_variable.location(), | 					2763_error, | ||||||
|  | 					_variable.location(), | ||||||
| 					"The following types are only supported for getters in ABIEncoderV2: " + | 					"The following types are only supported for getters in ABIEncoderV2: " + | ||||||
| 					joinHumanReadable(unsupportedTypes) + | 					joinHumanReadable(unsupportedTypes) + | ||||||
| 					". Either remove \"public\" or use \"pragma experimental ABIEncoderV2;\" to enable the feature." | 					". Either remove \"public\" or use \"pragma experimental ABIEncoderV2;\" to enable the feature." | ||||||
| @ -3125,8 +3126,7 @@ void TypeChecker::requireLValue(Expression const& _expression, bool _ordinaryAss | |||||||
| 	if (_expression.annotation().isLValue) | 	if (_expression.annotation().isLValue) | ||||||
| 		return; | 		return; | ||||||
| 
 | 
 | ||||||
| 	return m_errorReporter.typeError( | 	return m_errorReporter.typeError(1123_error, _expression.location(), [&]() { | ||||||
| 		1123_error,_expression.location(), [&]() { |  | ||||||
| 		if (_expression.annotation().isConstant) | 		if (_expression.annotation().isConstant) | ||||||
| 			return "Cannot assign to a constant variable."; | 			return "Cannot assign to a constant variable."; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user