mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Style changes.
This commit is contained in:
		
							parent
							
								
									ae5a6a235c
								
							
						
					
					
						commit
						6ec9586de3
					
				@ -365,23 +365,25 @@ void ExpressionCompiler::endVisit(MemberAccess const& _memberAccess)
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
	case Type::Category::CONTRACT:
 | 
						case Type::Category::CONTRACT:
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
							bool alsoSearchInteger = false;
 | 
				
			||||||
		ContractType const& type = dynamic_cast<ContractType const&>(*_memberAccess.getExpression().getType());
 | 
							ContractType const& type = dynamic_cast<ContractType const&>(*_memberAccess.getExpression().getType());
 | 
				
			||||||
		if (type.isSuper())
 | 
							if (type.isSuper())
 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
			m_context << m_context.getSuperFunctionEntryLabel(member, type.getContractDefinition()).pushTag();
 | 
								m_context << m_context.getSuperFunctionEntryLabel(member, type.getContractDefinition()).pushTag();
 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
 | 
								// ordinary contract type
 | 
				
			||||||
			u256 identifier = type.getFunctionIdentifier(member);
 | 
								u256 identifier = type.getFunctionIdentifier(member);
 | 
				
			||||||
			if (identifier != Invalid256)
 | 
								if (identifier != Invalid256)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				appendTypeConversion(type, IntegerType(0, IntegerType::Modifier::ADDRESS), true);
 | 
									appendTypeConversion(type, IntegerType(0, IntegerType::Modifier::ADDRESS), true);
 | 
				
			||||||
				m_context << identifier;
 | 
									m_context << identifier;
 | 
				
			||||||
				break;
 | 
					 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			// fall-through to "integer" otherwise (address)
 | 
								else
 | 
				
			||||||
 | 
									// not found in contract, search in members inherited from address
 | 
				
			||||||
 | 
									alsoSearchInteger = true;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							if (!alsoSearchInteger)
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	case Type::Category::INTEGER:
 | 
						case Type::Category::INTEGER:
 | 
				
			||||||
		if (member == "balance")
 | 
							if (member == "balance")
 | 
				
			||||||
 | 
				
			|||||||
@ -89,7 +89,6 @@ MagicVariableDeclaration const* GlobalContext::getCurrentSuper() const
 | 
				
			|||||||
		m_superPointer[m_currentContract] = make_shared<MagicVariableDeclaration>(
 | 
							m_superPointer[m_currentContract] = make_shared<MagicVariableDeclaration>(
 | 
				
			||||||
													"super", make_shared<ContractType>(*m_currentContract, true));
 | 
																		"super", make_shared<ContractType>(*m_currentContract, true));
 | 
				
			||||||
	return m_superPointer[m_currentContract].get();
 | 
						return m_superPointer[m_currentContract].get();
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user