mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Merge pull request #9691 from ethereum/oversized-function-array
Changed canonicalName() to toString() because of internal functions
This commit is contained in:
		
						commit
						df79a4f162
					
				| @ -616,7 +616,7 @@ bool TypeChecker::visit(VariableDeclaration const& _variable) | ||||
| 			if (_variable.isStateVariable()) | ||||
| 				m_errorReporter.warning(3408_error, _variable.location(), collisionMessage(_variable.name(), true)); | ||||
| 			else | ||||
| 				m_errorReporter.warning(2332_error, _variable.typeName().location(), collisionMessage(varType->canonicalName(), false)); | ||||
| 				m_errorReporter.warning(2332_error, _variable.typeName().location(), collisionMessage(varType->toString(true), false)); | ||||
| 		} | ||||
| 		vector<Type const*> oversizedSubtypes = frontend::oversizedSubtypes(*varType); | ||||
| 		for (Type const* subtype: oversizedSubtypes) | ||||
|  | ||||
| @ -4,11 +4,15 @@ contract b { | ||||
|     } | ||||
| 
 | ||||
|     c d; | ||||
| 
 | ||||
|     function e() public view { | ||||
|         c storage x = d; | ||||
| 	x.a[0]; | ||||
|         x.a[0]; | ||||
|         function()[3**44] storage fs; | ||||
|     } | ||||
| } | ||||
| // ---- | ||||
| // Warning 3408: (66-69): Variable "d" covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. | ||||
| // Warning 2332: (110-111): Type "b.c" covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. | ||||
| // Warning 2332: (111-112): Type "struct b.c" covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. | ||||
| // Warning 2332: (152-169): Type "function ()[984770902183611232881]" covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. | ||||
| // Warning 2072: (152-180): Unused local variable. | ||||
|  | ||||
| @ -3,4 +3,4 @@ contract C { | ||||
|     function f(S storage) internal {} | ||||
| } | ||||
| // ---- | ||||
| // Warning 2332: (64-65): Type "C.S" covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. | ||||
| // Warning 2332: (64-65): Type "struct C.S" covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction. | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user