aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-10-26 21:57:42 +0800
committerYoichi Hirai <i@yoichihirai.com>2016-11-11 22:51:54 +0800
commit6c15757618924a0da4491a243740c7bf0f70f60f (patch)
tree3aa6ff2824fd0af14472a6218aab47e94a9e5e65 /libsolidity/ast
parent33590d513e278526bdfbf4bd18ea5236a8911bb0 (diff)
downloaddexon-solidity-6c15757618924a0da4491a243740c7bf0f70f60f.tar.gz
dexon-solidity-6c15757618924a0da4491a243740c7bf0f70f60f.tar.zst
dexon-solidity-6c15757618924a0da4491a243740c7bf0f70f60f.zip
Type checker: move the burden of computing mobile type to commonType
This solves #621
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 7fe97fa7..0e077b32 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -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();
}