mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Merge pull request #10006 from ethereum/bug-9229-fix
Fixes internal compiler error with an unused reference to module member.
This commit is contained in:
		
						commit
						1a125cf755
					
				| @ -8,6 +8,7 @@ Compiler Features: | ||||
| 
 | ||||
| 
 | ||||
| Bugfixes: | ||||
|  * Code generator: Fix internal compiler error when referencing members via module name but not using the reference. | ||||
|  * Type Checker: Fix internal compiler error caused by storage parameters with nested mappings in libraries. | ||||
|  * Name Resolver: Fix shadowing/same-name warnings for later declarations. | ||||
| 
 | ||||
|  | ||||
| @ -1772,6 +1772,11 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess) | ||||
| 			solAssert(*_memberAccess.annotation().requiredLookup == VirtualLookup::Static, ""); | ||||
| 			utils().pushCombinedFunctionEntryLabel(*function); | ||||
| 		} | ||||
| 		else if (auto const* contract = dynamic_cast<ContractDefinition const*>(_memberAccess.annotation().referencedDeclaration)) | ||||
| 		{ | ||||
| 			if (contract->isLibrary()) | ||||
| 				m_context.appendLibraryAddress(contract->fullyQualifiedName()); | ||||
| 		} | ||||
| 		break; | ||||
| 	} | ||||
| 	default: | ||||
|  | ||||
| @ -0,0 +1,15 @@ | ||||
| ==== Source: s1.sol ==== | ||||
| import "s1.sol" as A; | ||||
| 
 | ||||
| library L { | ||||
|     function f() internal pure {} | ||||
| } | ||||
| 
 | ||||
| contract C | ||||
| { | ||||
|     function test() public pure { | ||||
|         A.L; | ||||
|     } | ||||
| } | ||||
| // ---- | ||||
| // Warning 6133: (s1.sol:127-130): Statement has no effect. | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user