aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-11-11 23:18:03 +0800
committerGitHub <noreply@github.com>2016-11-11 23:18:03 +0800
commit6248e92d77673eaf2c851b9dd0b1811248a24b58 (patch)
tree174bed458bfe9d1e1dd9e4a7a45387cbcf5d262d /libsolidity/ast
parenta40dcfef1257c4b159eb8248ecb0f837b42d8ead (diff)
parent41170d55075fc056a688dc8fb29021e23b645cc0 (diff)
downloaddexon-solidity-6248e92d77673eaf2c851b9dd0b1811248a24b58.tar.gz
dexon-solidity-6248e92d77673eaf2c851b9dd0b1811248a24b58.tar.zst
dexon-solidity-6248e92d77673eaf2c851b9dd0b1811248a24b58.zip
Merge pull request #1293 from ethereum/common_type_of_rational_type
tolerant type checking for inline arrays, by computing the common type in a more tolerant way
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();
}