mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Type checker: move the burden of computing mobile type to commonType
This solves #621
This commit is contained in:
@@ -200,10 +200,10 @@ TypePointer Type::commonType(TypePointer const& _a, TypePointer const& _b)
|
||||
{
|
||||
if (!_a || !_b)
|
||||
return TypePointer();
|
||||
else if (_b->isImplicitlyConvertibleTo(*_a))
|
||||
return _a;
|
||||
else if (_a->isImplicitlyConvertibleTo(*_b))
|
||||
return _b;
|
||||
else if (_b->isImplicitlyConvertibleTo(*_a->mobileType()))
|
||||
return _a->mobileType();
|
||||
else if (_a->isImplicitlyConvertibleTo(*_b->mobileType()))
|
||||
return _b->mobileType();
|
||||
else
|
||||
return TypePointer();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user